TDK44 Posted February 24, 2012 Share Posted February 24, 2012 I have learned a lot reading around on this forum, however, I am having trouble getting this script to work with a number set as the triggering hotkey. It works perfectly if I use a letter or function key, and I would like to bind it to non-keypad numbers. Error I am getting upon running this script is 'Line 10...func 5() Error:Badly formatted "func" statement." Any insight would be greatly appreciated! Global $a HotKeySet("5", "5") While 1 MouseGetPos() sleep(10) WEnd Func 5() send("j") sleep(100) send("b") sleep(100) send("u") sleep(100) ;MsgBox(32, "a", "a") EndFunc Link to comment Share on other sites More sharing options...
DW1 Posted February 24, 2012 Share Posted February 24, 2012 From the help file:Function names must start with either a letter or an underscore, and the remainder of the name can contain any combination of letters and numbers and underscores. AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 24, 2012 Moderators Share Posted February 24, 2012 TDK44,From the Help file:"Function names must start with either a letter or an underscore, and the remainder of the name can contain any combination of letters and numbers and underscores"Does that make it clearer? 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...
TDK44 Posted February 24, 2012 Author Share Posted February 24, 2012 That actually did...I guess I missed that part in the help file, but thank both of you for pointing it out to me. Got it working! Link to comment Share on other sites More sharing options...
kylomas Posted February 24, 2012 Share Posted February 24, 2012 TDK44, What was your solution? kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
somdcomputerguy Posted February 24, 2012 Share Posted February 24, 2012 He probably correctly renamed the assigned function. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. 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