unreal99 Posted January 13, 2009 Posted January 13, 2009 Hey,i'm new to this,and i am trying to make a small program using gui.So far i've made it without gui. i've set for example f1 to send text to any application.----------------------------------------------HotKeySet("{f1}", "ShowMessage") Func ShowMessage() Send("hey")EndFunc----------------------------------------------this works.how can i make something like that using gui? instead of editing the script to customize my text,i could use input in the guijust to make sure you understand,i made a small picHope someone could help me get that,thanks alot in advanced
Valuater Posted January 13, 2009 Posted January 13, 2009 here's a start #include <GUIConstantsEx.au3> GUICreate(" My GUI input", 320, 120) $file1 = GUICtrlCreateInput("", 10, 5, 300, 20) $file2 = GUICtrlCreateInput("", 10, 35, 300, 20) $btn = GUICtrlCreateButton("Set", 40, 75, 60, 20) GUISetState() $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn MsgBox(4096, "Thanks Valuater... 8)", GUICtrlRead($file1) &@CRLF & GUICtrlRead($file2)) EndSelect WEnd 8)
Glyph Posted January 13, 2009 Posted January 13, 2009 (edited) #include <GUIConstantsEx.au3> HotKeySet("{f1}", "ShowMessage") GUICreate(" My GUI input", 320, 60) $file1 = GUICtrlCreateInput(IniRead("Settings.ini","Main","Message",""), 10, 5, 300, 20) $btn = GUICtrlCreateButton("Set",10,35,50,20) GUISetState() While 1 $msg = GUIGetMsg() if $Msg = $gui_event_close then IniWrite("Settings.ini","Main","Message",guictrlread($file1)) Exit EndIf if $Msg = $btn Then IniWrite("Settings.ini","Main","Message",guictrlread($file1)) EndIf WEnd Func ShowMessage() Send(guictrlread($file1)) EndFuncoÝ÷ ØêðØg¢¢jëh×6#include <GUIConstantsEx.au3> HotKeySet("{f1}", "ShowMessage") While 1 sleep(10) WEnd Func ShowMessage() Send(IniRead("Settings.ini","Main","Message","")) EndFunc Edited January 13, 2009 by Glyph tolle indicium
unreal99 Posted January 28, 2009 Author Posted January 28, 2009 (edited) i got a another question,kinda hard for me to believe its possible but anyway... lets say i'm using instant messanger program,and i have two buddies in two windows can i send the input text to first window then move to the second window and talk there normally while the other window is still sending the text ?(so basiclly i can be typing in two windows at the same time) hope its understandble Edited January 28, 2009 by unreal99
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