BarryBareth Posted May 19, 2015 Share Posted May 19, 2015 (edited) Hey guys! This is my first post here and any help will be appreciated.I'm quite new to any kind of scripting and I've been trying to make a script that types anything I type on my keyboard in morse code.The issue here is that i can't figure out a way to do "spaces", since when I try to do them it just gets stuck in a loop that spams the "/" symbol. Just enable the last func in the comment, if you want to see for yourself.I want it to do a "/ " when i press the space bar.Thanks for any replies!<snip> Edited May 19, 2015 by Melba23 Code removed Link to comment Share on other sites More sharing options...
iamtheky Posted May 19, 2015 Share Posted May 19, 2015 (edited) Hotkeyset apparently sends whatever you have set, in addition to whatever you have set for the space character (since you have a space character in your Send), see here with the letter "a" HotKeySet("{esc}", "stahp") HotKeySet("a", "ay") HotKeySet("{space}", "spake") while 1 sleep(10) WEnd Func ay() Send(".- ") EndFunc Func spake() send("SPACE_CHARACTER") EndFunc Func stahp() Exit EndFunc remove that space from your morse letters and you will probably get the behavior you desire. Edited May 19, 2015 by boththose ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 19, 2015 Moderators Share Posted May 19, 2015 BarryBareth,Welcome to the AutoIt forums.Unfortunately what you posted was a crude keylogger - which as you can see from the Forum rules is a forbidden subject here. I realise that you were not trying to log keys. but I suggest you read this announcement which clarifies what you can and cannot discuss on the forum with regards to key press detection. Thread locked.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