Ahmed97 Posted June 10, 2011 Share Posted June 10, 2011 (edited) hey guys i have a question about hotkeyset or func i dont know why the "Hotkeyset" dont work in gui and work without gui see the script expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1_1 = GUICreate("AutoTalker By: Modi", 453, 252, 192, 326) $MenuFile = GUICtrlCreateMenu("&File") $MenuExit = GUICtrlCreateMenuItem("Exit", $MenuFile) $MenuHelp = GUICtrlCreateMenu("&Help") $MenuAbout = GUICtrlCreateMenuItem("About", $MenuHelp) $Input1 = GUICtrlCreateInput("", 72, 24, 353, 21) $Label1 = GUICtrlCreateLabel("Tybe your text here", 160, 3, 95, 17) $Label2 = GUICtrlCreateLabel("F1 To Start", 8, 27, 57, 17) $Input2 = GUICtrlCreateInput("", 72, 96, 353, 21) $Label4 = GUICtrlCreateLabel("F2 To Start", 8, 99, 57, 17) $Input3 = GUICtrlCreateInput("", 72, 168, 353, 21) $Label6 = GUICtrlCreateLabel("F3 To Start", 8, 171, 57, 17) $Label7 = GUICtrlCreateLabel("Version 1.0", 0, 216, 57, 13) $Exit = GUICtrlCreateButton("Exit", 368, 200, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) ;;;;;;;;;;;;;;;;;;;; $ReadInput1 = GUICtrlRead($Input1) $ReadInput2 = GUICtrlRead($Input2) $ReadInput3 = GUICtrlRead($Input3) ;;;;;;;;;; HotKeys ;;;;;;;;;; HotKeySet("{Esc}", "_Exit") HotKeySet("{F1}", "_Autotalk1") HotKeySet("{F2}", "_Autotalk2") HotKeySet("{F3}", "_Autotalk3") ;;;;;;;;;; Closing The Program ;;;;;;;;;; Func _Exit() Exit EndFunc ;==>_Exit ;;;;;;;;;; The AutoTalk buttons ;;;;;;;;;; Func _Autotalk1() Send($ReadInput1) EndFunc ;==>_Autotalk1 Func _Autotalk2() Send($ReadInput2) EndFunc ;==>_Autotalk2 Func _Autotalk3() Send($ReadInput3) EndFunc ;==>_Autotalk3 Func Blaa() Send("Bla bla bla") EndFunc ;==>Blaa HotKeySet("{F9}", "Blaa") While 1 WEnd in this script in above it dont working Func Blaa() Send("Bla bla bla") EndFunc ;==>Blaa HotKeySet("{F9}", "Blaa") While 1 WEnd and in this script it's working Edited June 10, 2011 by TheMaster Link to comment Share on other sites More sharing options...
Developers Jos Posted June 10, 2011 Developers Share Posted June 10, 2011 Where are these HotKeySet() statements in the first snippet? 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...
Maffe811 Posted June 10, 2011 Share Posted June 10, 2011 The difference between the scripts, as Jos said, is:HotKeySet("{F4}", "Blaa") [font="helvetica, arial, sans-serif"]Hobby graphics artist, using gimp.Automating pc stuff, using AutoIt.Listening to music, using Grooveshark.[/font]Scripts:[spoiler]Simple ScreenshotSaves you alot of trouble when taking a screenshot!Don't remember what happened with this, but aperantly the exe is all i got.If you don't want to run it, simply don't._IsRun UDFIt figures out if the script has ben ran before based on the info in a ini file.If you don't want to use exactly what i wrote, you can use it as inspiration.[/spoiler] Link to comment Share on other sites More sharing options...
Ahmed97 Posted June 10, 2011 Author Share Posted June 10, 2011 Where are these HotKeySet() statements in the first snippet?srry i forget ^^ Link to comment Share on other sites More sharing options...
Ahmed97 Posted June 10, 2011 Author Share Posted June 10, 2011 i dont understand you maffe 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