Jump to content
Sign in to follow this  

trouble with Send + variables

Recommended Posts

searching fourms, found nothing relating to this problem

I was wondering if somebody can show me how to set a variable in a script.

i was guessing the following will set variable combo_1 to macmail

$combo_1 = ("MACMAIL")

then i want to Send the variable as keystrokes

iv tried a few combonation of the below, but no luck

Send ("$Combo_1" [, flag = 1] )

help files say

Note, by setting the flag parameter to 1 the "keys" parameter is sent RAW. This is useful when you want to send some text copied from a variable and you want the text sent exactly as written.

My finished task will be a GUI (1/2 created) that has 2 dropdown menus, and to text entries

i want to select the drop down menu, type in box. select 2nd drop down menu, type in box

then output all the 4 controls to a string of keystrokes to a program i use at work. If u can understand how to output variables as keystrokes ill be almost finished with it (i think)

if your interested, my 1/2 done GUI is below.

; Script generated by AutoBuilder 0.6 Prototype

#include <GuiConstants.au3>

#Include <GuiCombo.au3>

GuiCreate("***************", 480, 255,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Combo_1 = GuiCtrlCreateCombo("Reps location", 20, 20, 160, 21)

_GUICtrlComboDeleteString (-1, 0)

$Input_2 = GuiCtrlCreateInput("", 270, 20, 190, 20)

$Combo_4 = GuiCtrlCreateCombo("advised for", 20, 60, 440, 21)

_GUICtrlComboDeleteString (-1, 0)

$Input_5 = GuiCtrlCreateInput("", 20, 100, 440, 80)

$Button_6 = GuiCtrlCreateButton("Advise!", 180, 200, 110, 30)

GUICtrlSetData($Combo_1, "ONDSL - |ONHSD - |CVGDSL - |CVGHSD - |UCMS - ")

GUICtrlSetData($Combo_4, "----For DSL: ----|1. A-NUM : |2. Template : |3. RPTDSL : |4. Incorrect Symptom : |5. Other : |6. PPPoA : |----For HSD: ----|1. Template : |2. Incorrect booking : |3. Other : ")


While 1

$msg = GuiGetMsg()


Case $msg = $GUI_EVENT_CLOSE


Case Else





Share this post

Link to post
Share on other sites

Awesome!! works in my little test script!

would i be correct in saying that if i enter text into either test input ($Input_5 = GuiCtrlCreateInput) it will set the variable to the value entered?

and would that also mean that if i choose an item from the dropdown menu, it will also set the variable to whats selected??

thanx fopr the help!

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...