Author Topic: Is it possible  (Read 2190 times)

0 Members and 1 Guest are viewing this topic.

Offline GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +24
  • Referrals: 0
    • View Profile
Is it possible
« on: February 13, 2014, 07:33:11 PM »
0
Is it possible to have one script pause another script?

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Is it possible
« Reply #1 on: February 13, 2014, 08:01:27 PM »
0
Sure, you can use global variables to do that.

In one script do this:

Code: [Select]
sub PauseScript
  namespace push
  namespace global monitor
  set !pause %1
  namespace pop
return

Then call to pause just do:

Code: [Select]
gosub PauseScript #TRUE ; or #FALSE to unpause

Then in the other script tab, do something like this

Code: [Select]

repeat
  namespace push
  namespace global monitor
  repeat
  until  !pause = #TRUE
  namespace pop
until #FALSE

If you really want to "PAUSE" it without need to control the start back up, just put a "pause" command in for the successful test for !pause

note this only works for scripts contained within a single EUO instance and multiple tabs. 
« Last Edit: February 13, 2014, 08:03:52 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +24
  • Referrals: 0
    • View Profile
Re: Is it possible
« Reply #2 on: February 14, 2014, 11:30:23 AM »
0
A global variable to control a pause, of course... Another reason to continue my learning of namespace globals... Thanks TM.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Is it possible
« Reply #3 on: February 14, 2014, 11:42:39 AM »
0
You betcha
Please read the ScriptUO site RULES
Come play RIFT with me!

Tags: