SRL Archive - General News

Running a Script from a TMenuItem


Coh3n

2010-11-18 01:30:53

Is it possible?

I would like a user to be able to simply click MSI > Run, and the forum pops up ready to go. Or, was something like this going to be included in the Script Manager?

Thanks,
Cohen

Gu3st...

2010-11-18 02:43:25

That would be great!!!

If that's not possible, what about this: if you click MSI > Run, Simba will open the RunMe.Simba script and run it?

Coh3n

2010-11-18 02:53:25

From: Zyt3x
That would be great!!!

If that's not possible, what about this: if you click MSI > Run, Simba will open the RunMe.Simba script and run it?

As long as it is run automatically, it would work just as well. :) The less work for the user the better.

Naike

2010-11-19 09:43:45


CD D:\Simba\
D:
simba.exe -o scripts\hooks.simba -r

Thanks Wizzup :)

Sir R. M8gic1an

2010-11-19 12:28:59

From: Naike

CD D:\Simba\
D:
simba.exe -o scripts\hooks.simba -r

Thanks Wizzup :)


Woot! :)

~RM

Coh3n

2010-11-19 18:51:37

…umm what? :o

Wizzup?

2010-11-20 13:06:47

There is no way to do this with an extension. What N1ke showed you is how to run it from cmd.exe and make it run the script on start. What you want is functions that you can call from an extension to actually run/start a script in Simba. It is very do-able. You can file a bug/feature request I suppose.

Coh3n

2010-11-29 20:23:35

From: Wizzup?
There is no way to do this with an extension. What N1ke showed you is how to run it from cmd.exe and make it run the script on start. What you want is functions that you can call from an extension to actually run/start a script in Simba. It is very do-able. You can file a bug/feature request I suppose.

Okay thanks. I just wanted to know if it was possible. I'll have to come back to it when the time comes. :)

Would this work? The extension includes all the MSI files (kind of like our Player Remote extension includes some MSI files), and I just do

menuItem_RunMSI.OnClick := @MSI_Mainloop;

E: I've tested and you can do that. :) However, I get this error when I try to include SRL in the extension. Is there any way around this? If not, my idea kind of halts. :p

Error in Simba extension (C:\Simba\Extensions\FormText.sex) : Unknown compiler directives at 2:18

Nava2

2010-11-30 04:00:51

From: Coh3n
Okay thanks. I just wanted to know if it was possible. I'll have to come back to it when the time comes. :)

Would this work? The extension includes all the MSI files (kind of like our Player Remote extension includes some MSI files), and I just do

menuItem_RunMSI.OnClick := @MSI_Mainloop;

E: I've tested and you can do that. :) However, I get this error when I try to include SRL in the extension. Is there any way around this? If not, my idea kind of halts. :p

Error in Simba extension (C:\Simba\Extensions\FormText.sex) : Unknown compiler directives at 2:18


Extensions are sandboxed for a reason. It allows everything to be more secure and ..possibly.. thread-safe. Thats why you can't do ``include'' in an extension.

Coh3n

2010-11-30 04:13:42

From: Nava2
Extensions are sandboxed for a reason. It allows everything to be more secure and ..possibly.. thread-safe. Thats why you can't do ``include'' in an extension.

We include files in the player remote extension and it works. =\

I just assumed the defines were the problem. It doesn't seem like this idea will work exactly the way I want it to. :crying:

Wizzup?

2010-11-30 04:18:34

From: Coh3n
Okay thanks. I just wanted to know if it was possible. I'll have to come back to it when the time comes. :)

Would this work? The extension includes all the MSI files (kind of like our Player Remote extension includes some MSI files), and I just do

menuItem_RunMSI.OnClick := @MSI_Mainloop;

E: I've tested and you can do that. :) However, I get this error when I try to include SRL in the extension. Is there any way around this? If not, my idea kind of halts. :p

Error in Simba extension (C:\Simba\Extensions\FormText.sex) : Unknown compiler directives at 2:18


No; that won't work. There are a few issues with this. One is that scripts will now be run on the main thread. Second is that we do not expose all colourfinding/etc to extensions. It'll require some Simba modification, but it is surely possible.

Coh3n

2010-11-30 04:21:51

From: Wizzup?
No; that won't work. There are a few issues with this. One is that scripts will now be run on the main thread. Second is that we do not expose all colourfinding/etc to extensions. It'll require some Simba modification, but it is surely possible.

It's good to know it's possible. Whether it's worth it or not is up to you. This was all just an idea to make running MSI easier; however, opening one script and hitting run shouldn't be that difficult to begin with. :p