Author Topic: Sessions interact  (Read 5575 times)

0 Members and 1 Guest are viewing this topic.

Offline tuxonTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Activity:
    0%
  • Reputation Power: 1
  • tuxon has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Sessions interact
« on: October 01, 2011, 12:06:32 PM »
0
Hi all,
i' m trying to find if there is a way to make a script execute actions directly on easyuo.
For example, i have easyuo opened with 3 sessions. My purpose will be like:

in script 3 (for example) make a command that, under a check, "hits" the pause button for script on tab 2.

I tryed with the click command, but it interact with the client and not with easyuo; is it possible to do this by other ways?
I want to put the pause command in another script for make it more reactive, if i put it in a main script may pass seconds before the check.

Offline freddy

  • Sr. Member
  • *
  • Posts: 271
  • Activity:
    0%
  • Reputation Power: 4
  • freddy has no influence.
  • Gender: Male
  • Respect: +110
  • Referrals: 1
    • View Profile
Re: Sessions interact
« Reply #1 on: October 01, 2011, 12:21:33 PM »
0
You can use persistent  vars * (stores data in registry) or namespace vars !

http://wiki.easyuo.com/index.php?title=Variables

You can get a script to pause euo, but it wont be able to play again. You'd have to have a script scan for the var that tells it to pause and do something like
repeat
until *resume = #true  

then set that var to false

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +786
  • Referrals: 1
    • View Profile
Re: Sessions interact
« Reply #2 on: October 01, 2011, 06:55:19 PM »
0
The thing is if you main script doesnt detect a pause button pressed in it very fast it also wont detect a var set to pause very fast either.

If would recommend that you create a sub that checks for the pause button, and call it from many places in your script.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline tuxonTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Activity:
    0%
  • Reputation Power: 1
  • tuxon has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Sessions interact
« Reply #3 on: October 02, 2011, 12:01:18 PM »
0
I have find this in a topic of the easyuo forum, but i don' t know what means :

Quote
I hope this helps ya out. You can add the check anywhere in your script as it uses a subroutine which will return it to its exact location in your script that it pauses at.


;This is assuming *77 is used as pause
;variable like above.. setting *77 in
;another euo window to "pause" will make
;this window enter a pauseloop until its
;set back to "ok".


Mainloop:
if *77 = pause
  gosub pause
<other code>
goto mainloop

Sub Pause
  Pause_Loop:
  if *77 <> ok
  goto Pause_Loop
return

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +786
  • Referrals: 1
    • View Profile
Re: Sessions interact
« Reply #4 on: October 02, 2011, 05:59:17 PM »
0
it means if you

set *77 Pause

in script A

and put the other code in script B in many many places.   Then script B will pause when *77 = pause and it comes arouse the line that checks if *77 = pause.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +786
  • Referrals: 1
    • View Profile
Re: Sessions interact
« Reply #5 on: October 02, 2011, 05:59:44 PM »
0
of course you can also use the pause option from the easyuo menu.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +602
  • Referrals: 2
    • View Profile
Re: Sessions interact
« Reply #6 on: October 03, 2011, 07:38:16 AM »
0
Moved to Scripting Chat.

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline tuxonTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Activity:
    0%
  • Reputation Power: 1
  • tuxon has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Sessions interact
« Reply #7 on: October 03, 2011, 12:27:40 PM »
0
For now i solved using a clicking program.

This program can click a portion of the screen, after setting the coordinates to click, and has an hotkey to run.
Easyuo opened on the tab of the main script, and the control-script run :
Code: [Select]
key S SHIFT
Shift-S is the hotkey of the clicking program. I set it with the coordinates of the pause button of easyuo.
So i can directly run a very little script to immediatly pause the main script without put lots of control in it.

This is a rough solution, but at the moment is the only i was able to make work  :P
I was also thinking make a little application to run by a "call" of easyuo, but i wasn' t able to compile it.
If i find an easy way to pause scripts i' ll post it.

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +786
  • Referrals: 1
    • View Profile
Re: Sessions interact
« Reply #8 on: October 03, 2011, 05:34:00 PM »
0
the easiest way to pause scripts is to inbuild that function into the script itself.
Most of my scripts have that function, but not everyone knows how.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline tuxonTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Activity:
    0%
  • Reputation Power: 1
  • tuxon has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Sessions interact
« Reply #9 on: October 04, 2011, 05:16:15 AM »
0
but not everyone knows how.
I' m one of them  :P
I tryed to put a lot of checks for pause in a very big script, but the only result was that i make it looping hehehe

I' ll need to study more about scripting

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +861
  • Referrals: 11
    • View Profile
Re: Sessions interact
« Reply #10 on: October 04, 2011, 05:37:14 AM »
0
while *tuxon_pause = on
  wait 1

In the control script you can put the toggle for turning *tuxon_pause on or off.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline tuxonTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Activity:
    0%
  • Reputation Power: 1
  • tuxon has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Sessions interact
« Reply #11 on: October 04, 2011, 06:55:24 AM »
0
I' ve done this sub for world save check:
Code: [Select]
scanjournal !i
      if #jcolor = 53
      {
         if THE_WORLD_WILL_SAVE_IN in #journal || WORLD_IS_SAVING in #journal
         {
            Event sysmessage  SAVE Detected
            key c ctrl alt ;pause
            event sysmessage SCRIPT PAUSED
         }
         if CLEANING in #journal
         {
            Event sysmessage  CLEANING Detected
            key c ctrl alt ;pause
            event sysmessage SCRIPT PAUSED
         }
         if COMPLETE in #journal
         {
            key s ctrl alt ;start
            event sysmessage SCRIPT RESUMED
         }
         if CLEANED in #journal
         {
            key s ctrl alt ;start
            event sysmessage SCRIPT RESUMED
         }
      }         

   nameSpace Clear
   nameSpace Pop
return

If i put it in a questing script i' ll have to insert a "gosub SAVE_CHECK" like 50 times and it goes crazy, this is the reason why i was trying to manage the main script without insert the control directly in it :)

Tags: