onestcoder Posted March 3, 2006 Share Posted March 3, 2006 If you have a script that is using a on event gui button setup is it possible to have the button run a fuction that sends a hotkey? Need a website: http://www.iconixmarketing.com Link to comment Share on other sites More sharing options...
cdkid Posted March 3, 2006 Share Posted March 3, 2006 HotKeySet("a","somefunc") While 1 sleep(100000) WEnd func somefunc() hotkeyset('a','') send("a") hotkeyset('a','somefunc') endfunc that should help ya a bit AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
jvanegmond Posted March 3, 2006 Share Posted March 3, 2006 What do you mean by send a hotkey? You can open a function with a GUI button or send a key with a GUI button, both are possible. github.com/jvanegmond Link to comment Share on other sites More sharing options...
onestcoder Posted March 3, 2006 Author Share Posted March 3, 2006 (edited) What do you mean by send a hotkey? You can open a function with a GUI button or send a key with a GUI button, both are possible. something like $gui = GUICreate("ONESTCODER BOTZ", 212, 75, 0, 0, -1, $WS_EX_TOPMOST) opt("GUIOnEventMode", 1) GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate") HotKeySet("{F9}", "TogglePause") $pause = GUICtrlCreateButton("PAUSE", 75, 40, 60) GUICtrlSetOnEvent($pause, "Pause") Func Pause() Send("{F9}"); this bing the HotKeySet("{F9}", "TogglePause") EndFunc Func TogglePause() $paused = Not $paused $run = Not $run If $paused = 0 Then ToolTip("") GUICtrlSetData($pausedinput, 'RUNNING') ElseIf $paused = 1 Then Sleep(100) ToolTip("") GUICtrlSetData($pausedinput, 'PAUSED') EndIf EndFunc ;==>TogglePause Edited March 3, 2006 by onestcoder Need a website: http://www.iconixmarketing.com Link to comment Share on other sites More sharing options...
Valuater Posted March 3, 2006 Share Posted March 3, 2006 this seems to work ( however you do not have a while/wend loop in your "pause" ) expandcollapse popup#include <GUIConstants.au3> Dim $paused $gui = GUICreate("ONESTCODER BOTZ", 212, 75, 100, 100, -1, $WS_EX_TOPMOST) opt("GUIOnEventMode", 1) GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate") HotKeySet("{F9}", "TogglePause") $pausedinput = GUICtrlCreateButton("PAUSE", 75, 40, 60) GUICtrlSetOnEvent( -1, "Pause") GUISetState() While 1 Sleep(10) WEnd Func Pause() Send("{F9}"); this bing the HotKeySet("{F9}", "TogglePause") EndFunc Func TogglePause() $paused = Not $paused ;$run = Not $run If $paused = 0 Then ToolTip("Running",5.5) GUICtrlSetData($pausedinput, 'RUNNING') ElseIf $paused = 1 Then Sleep(100) ToolTip("Paused",5,5) GUICtrlSetData($pausedinput, 'PAUSED') EndIf EndFunc ;==>TogglePause Func Terminate() Exit EndFunc 8) Link to comment Share on other sites More sharing options...
onestcoder Posted March 6, 2006 Author Share Posted March 6, 2006 so i don't need the $run = Not $run Need a website: http://www.iconixmarketing.com 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