pezo89 Posted January 11, 2009 Share Posted January 11, 2009 Hello, i where wondering if it is possible to start a script with a keytouch, like how u can exit a script pressing a keystroke?... Link to comment Share on other sites More sharing options...
Developers Jos Posted January 11, 2009 Developers Share Posted January 11, 2009 sure...put a shortcut to the compiled script on your desktop and assign a "ShortCut Key" to it. 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...
Valuater Posted January 11, 2009 Share Posted January 11, 2009 Another approach... Welcome to the Forums! Look up "HotKeySet" in the help file 8) Link to comment Share on other sites More sharing options...
FireFox Posted January 11, 2009 Share Posted January 11, 2009 @Jos Could it be possible to make HotKeySet wich key selected works in others apps ? For example you have : HotKeySet("s","_none") Func _none() ;nothing EndFunc While 1 WEnd for me "s" key doesnt work in notepad... Cheers, FireFox. Link to comment Share on other sites More sharing options...
Valuater Posted January 11, 2009 Share Posted January 11, 2009 need a sleep() in that loop firefox 8) Link to comment Share on other sites More sharing options...
Developers Jos Posted January 11, 2009 Developers Share Posted January 11, 2009 Another approach... Welcome to the Forums! Look up "HotKeySet" in the help file 8)Think the OP want to start a script and this would require a script to run already. @Jos Could it be possible to make HotKeySet wich key selected works in others apps ? For example you have : HotKeySet("s","_none") Func _none() ;nothing EndFunc While 1 WEnd for me "s" key doesnt work in notepad... Cheers, FireFox.Maybe I am not understanding you correctly but isn;t that what you scripted? 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...
FireFox Posted January 11, 2009 Share Posted January 11, 2009 (edited) @Valuater ... its an example just read my problem Edit : @Jos I mean that after launch script when i go to write something in other apps like notepad, the specified key doesnt work (in my example s key) Cheers, FireFox. Edited January 11, 2009 by FireFox Link to comment Share on other sites More sharing options...
CodyBarrett Posted January 12, 2009 Share Posted January 12, 2009 why dont you make a script that runs on startup and have specific hotkeys assigned to it then which hotkey is pressed call that funcition... like you want the .au3 script to run when you hit F5(for example) why dont you make it so the script IS ALREADY running but when you hit f5 it calls th funtions that you want that script to perfrom do you comprehend? [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
iHonda Posted January 12, 2009 Share Posted January 12, 2009 using hotkeyset you give the script exclusive focus to the key if im correct _IsPressed doesn't not sure though i havnt used it yet A great place to start Autoit 1-2-3 Link to comment Share on other sites More sharing options...
pezo89 Posted January 12, 2009 Author Share Posted January 12, 2009 well i tend to use it in various games thou, and i assume that the hotkeys on the comp is possible to press "ingame" Link to comment Share on other sites More sharing options...
Valuater Posted January 12, 2009 Share Posted January 12, 2009 Some games have a program like Game-Guard running and your scripts may not work! 8) Link to comment Share on other sites More sharing options...
herewasplato Posted January 12, 2009 Share Posted January 12, 2009 sure...put a shortcut to the compiled script on your desktop and assign a "ShortCut Key" to it.Or if you really want to be brave, you can: use an au3 file (not compiled) put that file anywhere on your hard drive that you wish [well - maybe not the recycle bin :-] copy the file paste a shortcut to your desktop [or somewhere in the start menu folder structure] right click on that shortcut select properties from the OS context menu type one letter into the field named 'Shortcut key" [for example the letter s] When you want to start that au3 file/script... ...press ctrl-alt-s I said brave because using an au3 file instead of a compiled script means that someday, you might update AutoIt to a new version and find that your au3 file no longer works as it had before. Also, if you decide not to put the shortcut to the au3 file on you desktop, you might have to reboot the computer to get it to register the OS 'Shortcut key", especially if the shortcut that you paste is nested several folders deep in the start folder structure. But putting them all in one place in the start folder structure can keep some clutter off of the desktop. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
herewasplato Posted January 12, 2009 Share Posted January 12, 2009 ... I mean that after launch script when i go to write something in other apps like notepad, the specified key doesnt work (in my example s key) ...Why is this a surprise to you?From the help file under HotKeySet:When you set a hotkey, AutoIt captures the key-press and does not pass it on to the active application, with one exception: the Lock keys (NumLock, CapsLock, and ScrollLock) still toggle their respective state! [size="1"][font="Arial"].[u].[/u][/font][/size] 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