cerix Posted June 14, 2009 Share Posted June 14, 2009 i have a problem... Send("{ALT}") this code just one click when i want always click i must this code While 1 sleep(30) Send("{ALT}") WEnd how can i tell? so.... always finger on Alt not press one click always press so one finger always on ALT Could i tell ? Link to comment Share on other sites More sharing options...
cerix Posted June 14, 2009 Author Share Posted June 14, 2009 HotKeySet("{F2}", "start") HotKeySet("{F3}", "stop") HotKeySet("{F6}", "escape") main() Func main() While 1 WEnd EndFunc;==>main Func start() Send("{ALT}" [, 0]) WEnd EndFunc;==>start Func stop() main() EndFunc;==>stop Func escape() ?????????? Exit EndFunc;==>escape Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 14, 2009 Moderators Share Posted June 14, 2009 cerix, There must be literally hundreds of snippets like this on the forums - try using search next time. ;-)HotKeySet("{F2}", "start") HotKeySet("{F3}", "stop") HotKeySet("{F6}", "escape") Global $fRun = False main() Func main() While 1 Sleep(10); Important or you can get 100% CPU usage <<<<<<<<<<<<<< WEnd EndFunc ;==>main Func start() $fRun = True While $fRun Send("{ALT}"[, 0]) WEnd EndFunc ;==>start Func stop() $fRun = False EndFunc ;==>stop Func escape() Exit EndFunc ;==>escape M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 14, 2009 Moderators Share Posted June 14, 2009 cerix,Read the Help file for Send:{ALTDOWN} - Holds the ALT key down until {ALTUP} is sentBut be careful because the key can "stick" down. Search the forum for how to cure that (start with the FAQ sticky at the top :-))M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
cerix Posted June 14, 2009 Author Share Posted June 14, 2009 cerix, There must be literally hundreds of snippets like this on the forums - try using search next time. ;-)HotKeySet("{F2}", "start") HotKeySet("{F3}", "stop") HotKeySet("{F6}", "escape") Global $fRun = False main() Func main() While 1 Sleep(10); Important or you can get 100% CPU usage <<<<<<<<<<<<<< WEnd EndFunc ;==>main Func start() $fRun = True While $fRun Send("{ALT}"[, 0]) WEnd EndFunc ;==>start Func stop() $fRun = False EndFunc ;==>stop Func escape() Exit EndFunc ;==>escape M23 but this code not working??? problem here Send("{ALT}"[, 0]) Link to comment Share on other sites More sharing options...
Developers Jos Posted June 14, 2009 Developers Share Posted June 14, 2009 but this code not working??? problem here Send("{ALT}"[, 0])correct. You are not supposed to copy the syntax from the helpfile and expect it to work. [,0] means that this is an optional parameter. Just use Send("{ALT}"). Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
cerix Posted June 14, 2009 Author Share Posted June 14, 2009 HotKeySet("{F2}", "start") HotKeySet("{F3}", "stop") HotKeySet("{F6}", "escape") Global $fRun = False main() Func main() While 1 Sleep(10) WEnd EndFunc ;==>main Func start() $fRun = True While $fRun Send("{ALT}", 0) WEnd EndFunc ;==>start Func stop() $fRun = False EndFunc ;==>stop Func escape() Exit EndFunc ;==>escape This code pressing as ALT ALT ALT ALT ALT ................................. But i want JUST onetimes press but Dont pull over ALT buttons Link to comment Share on other sites More sharing options...
Developers Jos Posted June 14, 2009 Developers Share Posted June 14, 2009 (edited) There is no need to create a new topic for each question about the same script everytime. Try using {ALTDOWN} Jos PS: All 3 threads merged. Edited June 14, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
martin Posted June 14, 2009 Share Posted June 14, 2009 HotKeySet("{F2}", "start")HotKeySet("{F3}", "stop")HotKeySet("{F6}", "escape")Global $fRun = Falsemain()Func main() While 1 Sleep(10) WEndEndFunc ;==>mainFunc start() $fRun = True While $fRun Send("{ALT}", 0) WEndEndFunc ;==>startFunc stop() $fRun = FalseEndFunc ;==>stopFunc escape() ExitEndFunc ;==>escapeThis code pressing as ALT ALT ALT ALT ALT .................................But i wantJUST onetimes press but Dont pull over ALT buttonsYou don't need to start a new thread for a subject you already have a thread for, just post in the first thread.You do need to learn to read the help. If you look in the help for "Send" you will see a table for the send commands and the resulting key press. What you want is in that list! Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 14, 2009 Moderators Share Posted June 14, 2009 cerix, I already gave you that advice (and some more!) in one of your earlier posts. Please read the responses before posting again. ;-) M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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