Author Topic: Opening/Canceling scripts [SOLVED]  (Read 3303 times)

0 Members and 1 Guest are viewing this topic.

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Opening/Canceling scripts [SOLVED]
« on: February 27, 2009, 05:25:33 PM »
0
This might be out of the realm of EUO.

I have a script that I use (personal) with a menu. The menu has all the typical elements.  For 2 of the buttons, I'd like to have the function of the buttons to "Load" another script.  Just as euo and SUO have in the title bar, the little open folder icon, I'd like these button to act the exact same way.  Pop open the typical windows Open/Cancel gump, select a script, and if possible, have the script name in the #result var.

I could use call, but every time I use this 'main' script, I'd have to change the call script line.  It's simpler to have the open/load window popup.

I looked through some of the dos commands and the only seemingly viable parameter is 'start'.  If that's where I need to begin, what then is the actual command to open the 'Open/Cancel' afterwards?
« Last Edit: June 24, 2009, 11:24:18 AM by TrailMyx »

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • 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: Opening/Canceling scripts
« Reply #1 on: February 28, 2009, 12:35:50 AM »
0
I think you are going to be out of luck with this idea.  The main problem comes from the inability for EasyUO to have more than one UI window per script.  That alone kills you.  Even if you "call" another script that has it's own window, the window won't be shown.  So, "call"ing a script won't show any UI.  I'm afraid you may have to "punt"........ ;)

Another possibility is to have the main script "server" all the potential UIs, and have the functional code residing in the "call" files.  That would be certainly doable.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: Opening/Canceling scripts
« Reply #2 on: February 28, 2009, 06:33:07 AM »
0
Ok, maybe I wasn't clear, or I still am not understanding. Suppose I were to press a button in my euo menu.  that button then in turn, runs this line:

Code: [Select]
If button was pressed
{
execute C:\MYDOCS~1\Scripts\test.bat
}

That batch file contains the .net (or whatever) Windows code that is used to open/load/save/cancel a file. just as you would with Microsoft word, or MS paint. However, when the script is selected and the open button pressed, the Batch file would simply return the name of the selected file and/or path to it. From there, the next line in the euo code could be something like:

Code: [Select]
call "the name of the selected file that the batch file returned"
Or

Code: [Select]
set %callthisscript #result
call %callthisscript

So, basically, euo will only run a code to get user information, and then 'call' the selection

The batch file runs the code to open the only 'window' opening aside from the EUO menu that is already.
And that window is built in to Windows, I'm just looking for the code to run it, and get information from it that can be read by euo.

Perhaps the action after choosing a file from the open dialog box could be to write a notepad.txt with the name and path of the selected file chosen from the batch file opening the windows dialog box.

Just like in the SUO engine.  There is code that is run when a user presses the open file button. the user looks around through folders and such, finds the script wanted, and presses the 'open' button.

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: +393
  • Referrals: 1
    • View Profile
Re: Opening/Canceling scripts
« Reply #3 on: February 28, 2009, 02:19:45 PM »
0
post of the dos bat file you are using .. but you have hit it already .. make the dos bat file write the results to a text file and then read that text file... or  call the text file and have the text file call the open file.

ie dump results to runme.txt and output such as "call <result of open path and filename>"

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 SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
Re: Opening/Canceling scripts
« Reply #4 on: February 28, 2009, 07:03:07 PM »
0
That's probably what will at least be what I'm looking for.  Know any recommendable sites to quickly learn how to write a batch file? or C# even?

Offline Xclio

  • Officially "The MAN"
  • Elite
  • *
  • *
  • Posts: 981
  • Activity:
    0%
  • Reputation Power: 9
  • Xclio has no influence.
  • Gender: Male
  • Respect: +56
  • Referrals: 1
    • View Profile
Re: Opening/Canceling scripts
« Reply #5 on: March 02, 2009, 06:31:05 AM »
0
You are definitally on the right track with the Batch file, after I read your first post I was thinking more along what TM responded with but when I thought about it I was thinking....hrmmmm maybe a batch or executable that could do all the work for you from the command line....which it seems you are already heading towards :)

If you want to use a really handy language you could use perl, it is very nice for just such things.

Tags: