Topic : Ridescript: How does 'ScriptMapMainMenu()' work

Forum : Ride IDE

Original Post
Post Information Post
February 27, 2008 - 11:28pm
Guest

The help file shows declares this as:

int ScriptMapMainMenu (string COMMAND, string KEYSTROKE);

However, there an error message when this is given two string parameters. With one parameter there's no error message. However it doesn't add a line to the 'Ridescript' menu either.

How does it work?

regards Steven Pruzina

Replies
Post Information Post
+1
0
-1
March 4, 2008 - 6:11pm
Guest

Unfortunately it is not possible to assign a shortcut to a script command.The help file should be updated!
This will only append the command to the main menu of Ride under RideScript menu.
It could be used to make your own script functions available from the main menu:

1. Create an "autoscript.wsc" file in Ride\Bin directory. This file will be loaded automatically at startup.
2. Wrtite your Script function with no parameter. It will be automatically loaded and become available.
int notepad()
{
ScriptShellExecute("notepad.exe",0);
return 1;
};
3. Write a main function where you can call MapMainMenu
int main()
{
ScriptMapMainMenu("notepad");
}

Notepad will be inserted in the Ride main menu under RideScript menu

Best regards,
Behnaz Bouchiat