Wabbit Posted September 26, 2006 Share Posted September 26, 2006 Hello,I am trying to send a "tab" to a message box, but it doesn't seem to work. I checked the help file and put together this:MsgBox(3, "My second script!", "Hello #1")winwaitactive ("My second script!", "&Yes")send ("{tab}")I would also like to be able to do the "shift-tab", which I tried by adding a "+", but that didn't work either. What am I doing wrong?Thanks! Link to comment Share on other sites More sharing options...
jvanegmond Posted September 26, 2006 Share Posted September 26, 2006 Send ("+{tab}") ;works. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 26, 2006 Share Posted September 26, 2006 Hi, I guess the script pauses until the MsgBox is pressed or timed out. That is why you cannot send the tab. What about building your own GUI? So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
GaryFrost Posted September 26, 2006 Share Posted September 26, 2006 Use Smoke_N's Custom Message Box and you should be able to do ithttp://www.autoitscript.com/forum/index.ph...st&p=232017 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Wabbit Posted September 26, 2006 Author Share Posted September 26, 2006 Hi,I guess the script pauses until the MsgBox is pressed or timed out. That is why you cannot send the tab. What about building your own GUI?So long,MegaI want to be able to automatically tab to a specific button that does not use an "Alt" key, then follow with an "enter" key.The script does seem to pause, but I expect to see the button focus change to the next button, but it stays on the first button.What am I doing wrong? Link to comment Share on other sites More sharing options...
Xenobiologist Posted September 26, 2006 Share Posted September 26, 2006 Hi, if you want to hit the button, why not using ControlClick? So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
GaryFrost Posted September 26, 2006 Share Posted September 26, 2006 Until the MsgBox is closed you will not be able to do the other commands/function calls see my post above for a work around. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Wabbit Posted September 26, 2006 Author Share Posted September 26, 2006 Hi,if you want to hit the button, why not using ControlClick?So long,MegaActually, I goofed. What I want to test is moving the focus to the next box (or two) and leaving it there as the default choice for a user to hit enter.But I also tried the control click option, but it didn't work. Could someone critique this for me:MsgBox(3, "My second script!", "Hello #1")winwaitactive ("My second script!", "&Yes");send ("+{tab}")ControlClick ( "My second script!", "&No", 7)Thanks! Link to comment Share on other sites More sharing options...
GaryFrost Posted September 26, 2006 Share Posted September 26, 2006 Actually, I goofed. What I want to test is moving the focus to the next box (or two) and leaving it there as the default choice for a user to hit enter.But I also tried the control click option, but it didn't work. Could someone critique this for me:MsgBox(3, "My second script!", "Hello #1")winwaitactive ("My second script!", "&Yes");send ("+{tab}")ControlClick ( "My second script!", "&No", 7)Thanks!See my post above yours, it's critiqued SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
herewasplato Posted September 26, 2006 Share Posted September 26, 2006 ...What I want to test is moving the focus to the next box (or two) and leaving it there as the default choice for a user to hit enter...Try each of these:MsgBox(3, "My second script!", "Hello #1") MsgBox(259, "My second script!", "Hello #1") MsgBox(515, "My second script!", "Hello #1")...or maybe I do not understand your request. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
GaryFrost Posted September 26, 2006 Share Posted September 26, 2006 Try each of these:MsgBox(3, "My second script!", "Hello #1") MsgBox(259, "My second script!", "Hello #1") MsgBox(515, "My second script!", "Hello #1")...or maybe I do not understand your request. One of is apparently SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Wabbit Posted September 26, 2006 Author Share Posted September 26, 2006 One of is apparentlySorry, I am new to this stuff, so when I looked at that code, it didn't make a lot of sense to me, like it was aimed at people who already know all about this stuff. I'll try and take another look at it. Link to comment Share on other sites More sharing options...
herewasplato Posted September 26, 2006 Share Posted September 26, 2006 (edited) ...What am I doing wrong?...If I understand you correctly, these three lines of code are in one script... Or are they just an example of what you would like to have happen while scripting another application?I'll assume that they are in one script and I'll repeat what others have already attempted to convey.MsgBox(3, "My second script!", "Hello #1") <<< Your script stops here - waiting on a human or another scriptwinwaitactive ("My second script!", "&Yes") This line of code will not act on the msgbox - 'cuz script is still haltedsend ("{tab}") This line of code will not act on that msgboxEdit - no need to apologize - just be patient with us as we don't always understand the question and don't always have the time for a long answer - i.e. I'm taking a short break from work right now... must keep it short. Edited September 26, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
AceLoc Posted September 26, 2006 Share Posted September 26, 2006 (edited) $oTest = ("Static1"); ye i know () isnt needed. MsgBox(3, "My second script!", "Hello #1") WinWaitActive("My second script!", "&Yes") $oTitle = WinGetTitle("") ControlSend($oTitle, "", $oTest, "{TAB}") should work :/ .. if you are trying to Send (TAB) at the msgbox Thnk. Edited September 26, 2006 by aceloc [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
herewasplato Posted September 26, 2006 Share Posted September 26, 2006 $oTest = ("Static1"); ye i know () isnt needed. MsgBox(3, "My second script!", "Hello #1") WinWaitActive("My second script!", "&Yes") $oTitle = WinGetTitle("") ControlSend($oTitle, "", $oTest, "{TAB}")oÝ÷ ÚÈhºWp¢¹?ü¨¹ªÞ¶¼¢hIéÝLZ¶Ø^È£Óy?ªê-xÚ"¶ÈhºWg¢Ü(®@âw*.®éò¢êÜ¡×yú+{*.¦-yضayú+ºdëÊØb²Þ)Þ¡÷(u殶sd×6t&÷2ÂgV÷C´×6V6öæB67&Bb333²gV÷C²ÂgV÷C´VÆÆò3gV÷C²oÝ÷ Ù8^Úò¶¬¢w¥wºÚ"µÍÙÐÞ NK ][ÝÓ^HÙXÛÛØÜ ÌÌÎÉ][ÝË ][ÝÒ[ÈÌI][ÝÊ See the difference. Sorry so terse/curt... [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
AceLoc Posted September 26, 2006 Share Posted September 26, 2006 No, it should not work. Did you run your code before you posted it to the forum? Try this one line of code:MsgBox(3, "My second script!", "Hello #1")oÝ÷ Ù8^Úò¶¬¢w¥wºÚ"µÍÙÐÞ NK ][ÝÓ^HÙXÛÛØÜ ÌÌÎÉ][ÝË ][ÝÒ[ÈÌI][ÝÊ See the difference. Sorry so terse/curt...sorry made a little fault (should= could). and it was an Example, and no - i didnt test it.. but instead of complaining about people that try to help you could make a code that WILL work. thnk [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
herewasplato Posted September 26, 2006 Share Posted September 26, 2006 ...you could make a code that WILL work...See my earlier post in this thread:http://www.autoitscript.com/forum/index.ph...st&p=241792Also try the code that I posted in my reply to you.Perhaps I should not post when I have so little time - I have failed to convey what I wanted to convey. :-( [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
AceLoc Posted September 26, 2006 Share Posted September 26, 2006 (edited) then i still dont get why this shouldnt work: $a = WinGetTitle("") MsgBox(3, "My second script!", "Hello #1") WinActivate($a) WinWaitActive($a, "&Yes") Send("{tab}") Edited September 26, 2006 by aceloc [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
GaryFrost Posted September 26, 2006 Share Posted September 26, 2006 then i still dont get why this shouldnt work: $a = WinGetTitle("") MsgBox(3, "My second script!", "Hello #1") WinActivate($a) WinWaitActive($a, "&Yes") Send("{tab}") $a = WinGetTitle("") MsgBox(3, "My second script!", "Hello #1") ;<<< Your script stops here - waiting on a human or another script WinActivate($a) ; This line of code will not act on the msgbox - 'cuz script is still halted WinWaitActive($a, "&Yes") ; same as above line send ("{tab}") ; same as above 2 lines suggest trying it you'll see. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Wabbit Posted September 26, 2006 Author Share Posted September 26, 2006 No, it should not work. Did you run your code before you posted it to the forum? Try this one line of code:MsgBox(3, "My second script!", "Hello #1")oÝ÷ Ù8^Úò¶¬¢w¥wºÚ"µÍÙÐÞ NK ][ÝÓ^HÙXÛÛØÜ ÌÌÎÉ][ÝË ][ÝÒ[ÈÌI][ÝÊ See the difference. Sorry so terse/curt... Ah, I get it. The 256+3 puts it on the second box. I should have paid more attention to the details on the help page. I was really not trying to accomplish a specific task, just trying to learn how it works for future possible ideas. Now, I tried the "ControlClick" option, as listed above, but it didn't work. Anyone know why? The 2 last options can be left out, if I understood the help page on that. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now