Husa Posted April 5, 2010 Share Posted April 5, 2010 Yeah, after 2 years of retired of using this autoit, i need some help from people, to remind me of how this was working ><.. I need a text script. So, if I press ctrl + shift + a(any button, in this case just a), then it types for example ; "Hello, my username is Husa. I need some help with this autoit script And I got the help I need cause I posted here. Thank you.." Can anyone do this for me? Just need this, and ill find out fastly how to do such scripts again.. I appreciate the help here, thank you. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 5, 2010 Moderators Share Posted April 5, 2010 Husa,Welcome (back?) to the AutoIt forum. AutoIt has changed a bit since you last used it - you might want to re-read the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) or look at the excellent tutorials that you will find here and here.Then if you look in the Help file for HotKeySet and Send, you will soon work out how to do what you want. If you run into problems, just post your code here and we will help. 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...
Husa Posted April 5, 2010 Author Share Posted April 5, 2010 Ill try that out thank you. i'll let you know here if I get problems Link to comment Share on other sites More sharing options...
Husa Posted April 5, 2010 Author Share Posted April 5, 2010 Just treid this now ; HotKeySet("{alt}+{LSHIFT}+a") func hotkeyset send ("hello") EndFunc I get a error saying ; Line 14 (File "C\users\husa\desktop\try.au3") fund hotkeyset send ("hello") error : Badly formatted func statement. if i remember right, there has to be a name for the hotkeyset, to tell func hotkseyset to tell. correct me if im wrong. anyone know what I did wrong here? please. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 5, 2010 Moderators Share Posted April 5, 2010 Husa,Did you actually read the Help file as I suggested? If so you must be real speed reader! From the HotKeySet page:HotKeySet ( "key" , "function" )That is how you tell the HotKey which function to run.The same page tells you how to tell AutoIt that you want to use the Alt and Shift keys as modifiers - what you have at present is not correct. Then if we look at virtually any of the help file examples you will see how to format a function:Func functioname ( parameters ) ... EndFuncYou have the function code on the same line as the Func keyword - hence the "Badly formatted func statement" error. I am quite prepared to help, but you need to make some effort yourself first. Go and READ carefully the pages I suggested and try 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...
GiulioM Posted April 5, 2010 Share Posted April 5, 2010 (edited) Try this While 1 HotKeySet("^+a", "husa") Func Husa SplashTextOn("Husa", "Hello, I'm Husa...") Sleep(10000) EndFunc Wend Edited April 5, 2010 by GiulioM Link to comment Share on other sites More sharing options...
Zedna Posted April 5, 2010 Share Posted April 5, 2010 (edited) You don't need HotkeySet for such simple use. Just compile this simple AU3 script: send ("hello") then create shortcut to compiled EXE file and in its properties fill your desired hotkey shortcut. BTW: Your nick sounds like Czech word, are you from Czech republic? Edited April 5, 2010 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Husa Posted April 5, 2010 Author Share Posted April 5, 2010 No, im from denmark.. giuliom ; Not working. full or errors. anyway, I got what I need : HotKeySet("{Shift+ALT+A}", "harhar") While 1 Sleep(50) WEnd Func harhar() Sleep(50) Send("{ENTER}") Send(" DIABLO MESSAGE LOOLOLOLOLOL") Send("{ENTER}") Sleep(50) Endfunc but it dosnt Send when i press on shift + alt + a. can anyone help me with the binding key? (alt + shift + a) Link to comment Share on other sites More sharing options...
Zedna Posted April 5, 2010 Share Posted April 5, 2010 HotKeySet("!+a", "harhar") Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Husa Posted April 5, 2010 Author Share Posted April 5, 2010 Yeah, just found that in the help file. now it keeps holding shift + alt down, how to fix this? Link to comment Share on other sites More sharing options...
GiulioM Posted April 5, 2010 Share Posted April 5, 2010 (edited) Voilà. 8 rows.prova.au3Concept: you start writing an HotKeySet command into an endless cycle, like: Do [...] Until @hour = 25; then, you write Func ... EndFunc command. Edited April 5, 2010 by GiulioM Link to comment Share on other sites More sharing options...
Husa Posted April 5, 2010 Author Share Posted April 5, 2010 guiliom, thats another kind of using it, i want to use mine since i know this way best. how do i fix this for keeping shift + alt down after script is done? Link to comment Share on other sites More sharing options...
ShawnW Posted April 5, 2010 Share Posted April 5, 2010 You guys should have followed Melba23's example. I'm sure he could have given the guy the code, but you know the old proverb "Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." Link to comment Share on other sites More sharing options...
Husa Posted April 5, 2010 Author Share Posted April 5, 2010 Btw, the one you gave me, thats not what im searching for.. your comes up with a window, where it says "Hello im husa". i want a script, so when i press alt + shift + a for example, it says "Hello im husa".. I got it allrdy. : HotKeySet("!+a", "harhar") While 1 Sleep(50) WEnd Func harhar() Sleep(50) Send("{ENTER}") Send(" DIABLO MESSAGE LOOLOLOLOLOL") Send("{ENTER}") Sleep(50) Endfunc my problem now: It keeps alt + shift down untill i manually press them my self. how do i fix this? Link to comment Share on other sites More sharing options...
Zedna Posted April 5, 2010 Share Posted April 5, 2010 how do i fix this for keeping shift + alt down after script is done? Place this at end of your script: HotKeySet("!+a", "") Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Husa Posted April 5, 2010 Author Share Posted April 5, 2010 Zedna that does not work still >< HotKeySet("!+a", "harhar") While 1 Sleep(50) WEnd Func harhar() Sleep(50) Send("{ENTER}") Send(" DIABLO MESSAGE LOOLOLOLOLOL") Send("{ENTER}") Sleep(50) HotKeySet("!+a", "") Endfunc Link to comment Share on other sites More sharing options...
GiulioM Posted April 5, 2010 Share Posted April 5, 2010 guiliom, thats another kind of using it, i want to use mine since i know this way best.how do i fix this for keeping shift + alt down after script is done?er, i haven't compresed. you mean something like a command Send () repeated infinitely? Link to comment Share on other sites More sharing options...
Zedna Posted April 5, 2010 Share Posted April 5, 2010 HotKeySet("!+a", "harhar") While 1 Sleep(50) WEnd HotKeySet("!+a", "") Func harhar() Sleep(50) Send("{ENTER}") Send(" DIABLO MESSAGE LOOLOLOLOLOL") Send("{ENTER}") Sleep(50) Endfunc You should more carefully read the helpfile instead of writing so many posts. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Husa Posted April 5, 2010 Author Share Posted April 5, 2010 HotKeySet("!+a", "harhar") While 1 Sleep(50) WEnd HotKeySet("!+a", "") Func harhar() Sleep(50) Send("{ENTER}") Send(" DIABLO MESSAGE LOOLOLOLOLOL") Send("{ENTER}") Sleep(50) Endfunc You should more carefully read the helpfile instead of writing so many posts. Still keeps alt + shift down ~~ HotKeySet("!+a", "harhar") While 1 Sleep(50) WEnd HotKeySet("!+a", "") Func harhar() Sleep(50) Send("{ENTER}") Send(" DIABLO MESSAGE LOOLOLOLOLOL") Send("{ENTER}") Sleep(50) Endfunc Link to comment Share on other sites More sharing options...
ShawnW Posted April 5, 2010 Share Posted April 5, 2010 That code does not keep them down, I think you might be using it from within some other application that is causing that problem. You could try sending "{ALTUP}{SHIFTUP}" but I'm not sure that will help. Also, if you are using it within another application and just sending "{ALTUP}{SHIFTUP}" does not work, try calling SendKeepActive("") before the "{ALTUP}{SHIFTUP}" with the window name in the quotes. Link to comment Share on other sites More sharing options...
Recommended Posts