Difference between revisions of "EQ2WindowReference"
From ISXOgre
(Created page with "== Notes == Note: This page is new, and needs everything added. Until then... it's kind of a mess, but the information is here none the less.. == Select Window == [Image:Im...") |
(→Select Window) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
== Select Window == | == Select Window == | ||
− | + | [[Image:SelectWindow.JPG]] | |
<pre> | <pre> | ||
Line 23: | Line 23: | ||
${OgreBotAPI.Select_Window_GetOption["-substring","Snow"]} is valid, and returns 3 | ${OgreBotAPI.Select_Window_GetOption["-substring","Snow"]} is valid, and returns 3 | ||
From a script outside of Ogrebot, you can call the function directly if you wish, to get a return value if it believes it was successful via: | From a script outside of Ogrebot, you can call the function directly if you wish, to get a return value if it believes it was successful via: | ||
− | + | call OgreBotAPI.Select_Window <ForWho> <Args> | |
This will return an int, -1 if ForWho wasn't for them, 0 if ForWho was for them, but it did not complete (likely the option doesn't exist), or > 0 with which option was selected. | This will return an int, -1 if ForWho wasn't for them, 0 if ForWho was for them, but it did not complete (likely the option doesn't exist), or > 0 with which option was selected. | ||
− | For testing, if you add | + | For testing, if you add "-test" to any of the Args, it will select the option but NOT hit the OK button, so you can confirm things are working, without it completing the window, such as: |
+ | OgreBotAPI:Select_Window[all,3,-test] | ||
That selects Snow Spore Shooter, but does not hit "OK" | That selects Snow Spore Shooter, but does not hit "OK" | ||
For debugging, add `"-Debug"`, and it will output some basic information to the console that should help with debugging. | For debugging, add `"-Debug"`, and it will output some basic information to the console that should help with debugging. |
Latest revision as of 02:22, 10 December 2022
Notes
Note: This page is new, and needs everything added. Until then... it's kind of a mess, but the information is here none the less..
Select Window
OgreBotAPI:Select_Window_Spew (01:19:51){20579ms}[OgreBot]: Select_Window -> [#2] Spore Shooter (01:19:51){20579ms}[OgreBot]: Select_Window -> [#3] Snow Spore Shooter Interaction: Using the above spew, you can use either the # or the value. For example, these both do the same thing. OgreBotAPI:Select_Window[all,"Snow Spore Shooter"] OgreBotAPI:Select_Window[all,3] By default, it is an exact match (string.Equal). If you'd like it to be a substring search (string.Find), you can do so with -substring. For example, this would work also. `OgreBotAPI:Select_Window[all,"-substring","Snow"]` If in a script, you want to know if an option exists, you can do that also. ${OgreBotAPI.Select_Window_GetOption["Snow Spore Shooter"]} Will return 0 if not found, or the # in which it's found. You will notice the numbering starts at 2, that's because 1 is the template in EQ2UIPage, so it's never used. The Select_Window_GetOption uses the same code, so you can use the same switches. ${OgreBotAPI.Select_Window_GetOption["-substring","Snow"]} is valid, and returns 3 From a script outside of Ogrebot, you can call the function directly if you wish, to get a return value if it believes it was successful via: call OgreBotAPI.Select_Window <ForWho> <Args> This will return an int, -1 if ForWho wasn't for them, 0 if ForWho was for them, but it did not complete (likely the option doesn't exist), or > 0 with which option was selected. For testing, if you add "-test" to any of the Args, it will select the option but NOT hit the OK button, so you can confirm things are working, without it completing the window, such as: OgreBotAPI:Select_Window[all,3,-test] That selects Snow Spore Shooter, but does not hit "OK" For debugging, add `"-Debug"`, and it will output some basic information to the console that should help with debugging. OgreConsole commands exist also: -Select_Window_AP and -Select_Window_Spew_AP A reminder: The `AP` stands for all parameters, meaning it will consume all parameters, and it cannot be stacked (this has to be done so it can read the -flags) Example: oc !c -Select_Window_AP all "Snow Spore Shooter"