Jump to content

Shortcuts using gui


unreal99
 Share

Recommended Posts

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 gui

just to make sure you understand,i made a small pic

Posted Image

Hope someone could help me get that,

thanks alot in advanced

Link to comment
Share on other sites

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)

NEWHeader1.png

Link to comment
Share on other sites

#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 by Glyph

tolle indicium

Link to comment
Share on other sites

  • 2 weeks later...

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 by unreal99
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...