Kyme Posted June 15, 2008 Share Posted June 15, 2008 what it's wrong in my script??? i wanna press F1,F2,F3,F4 when i press But1 nothing happen:( why??? #include <GUIConstants.au3> $Menu1 = GUICreate("Silkroad Skill Presser", 246, 463, 193, 115) $Fs = GUICtrlCreateCombo("", 128, 56, 41, 21) GUICtrlSetData($Fs, "F1|F2|F3|F4") $But1 = GUICtrlCreateButton("Start", 72, 416, 105, 33) GUISetState(@SW_SHOW) $Fsread=GUICtrlRead($Fs) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit case $Button1 WinActivate("Untitled - Notepad") Send($Fsread) EndSwitch WEnd Link to comment Share on other sites More sharing options...
Kiti Posted June 15, 2008 Share Posted June 15, 2008 (edited) Try this: #include <GUIConstants.au3> $Menu1 = GUICreate("Silkroad Skill Presser", 246, 463, 193, 115) $Fs = GUICtrlCreateCombo("", 128, 56, 41, 21) $a = GUICtrlSetData($Fs, "F1|F2|F3|F4") $Button1 = GUICtrlCreateButton("Start", 72, 416, 105, 33) GUISetState(@SW_SHOW) $Fsread=GUICtrlRead($a) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit case $Button1 Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send($Fsread) EndSwitch WEnd Edited June 15, 2008 by Kiti Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
Kyme Posted June 15, 2008 Author Share Posted June 15, 2008 (edited) Try this: #include <GUIConstants.au3> $Menu1 = GUICreate("Silkroad Skill Presser", 246, 463, 193, 115) $Fs = GUICtrlCreateCombo("", 128, 56, 41, 21) $a = GUICtrlSetData($Fs, "F1|F2|F3|F4") $Button1 = GUICtrlCreateButton("Start", 72, 416, 105, 33) GUISetState(@SW_SHOW) $Fsread=GUICtrlRead($a) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit case $Button1 Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send($Fsread) EndSwitch WEnd now send me "0" how i can make it to send {F1}??? like Send("{F1}") tnx Edited June 15, 2008 by Kyme Link to comment Share on other sites More sharing options...
BugFix Posted June 15, 2008 Share Posted June 15, 2008 #include <GUIConstants.au3> $Menu1 = GUICreate("Silkroad Skill Presser", 246, 463, 193, 115) $Fs = GUICtrlCreateCombo("", 128, 56, 41, 21) GUICtrlSetData($Fs, "F1|F2|F3|F4") $Button1 = GUICtrlCreateButton("Start", 72, 416, 105, 33) GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("{" & GUICtrlRead($Fs) & "}") ; sends the Fn-key, not Char "F" & Number "n" EndSwitch WEnd Best Regards BugFix Link to comment Share on other sites More sharing options...
Kyme Posted June 15, 2008 Author Share Posted June 15, 2008 #include <GUIConstants.au3> $Menu1 = GUICreate("Silkroad Skill Presser", 246, 463, 193, 115) $Fs = GUICtrlCreateCombo("", 128, 56, 41, 21) GUICtrlSetData($Fs, "F1|F2|F3|F4") $Button1 = GUICtrlCreateButton("Start", 72, 416, 105, 33) GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit Case $Button1 Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("{" & GUICtrlRead($Fs) & "}") ; sends the Fn-key, not Char "F" & Number "n" EndSwitch WEnd awesome....tnx alot.... 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