Jump to content

need help useing create combo


netrecov
 Share

Recommended Posts

GuiCtrlCreatecombo("Drives", 250, 80, 120, 100)

GUICtrlSetData(-1, "A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z")

$varA = ControlGetText("Drives", "", "")

$wssetup = GuiCtrlCreateButton("wssetup", 320, 145)

GUICtrlSetOnEvent($wssetup, "wssetup")

Func wssetup()

Run($varA & ":\wfx32\wssetup.exe")

EndFunc

ok here is what it says now. I still can't figure this out. I think I am overlooking something. I am just wanting to be able to change drive letter for that program.

Link to comment
Share on other sites

You need to use GUICtrlRead instead of ControlGetText; also, you need to assign a variable for combo handle.

$MyCombo = GuiCtrlCreatecombo("Drives", 250, 80, 120, 100)

and

$varA = GUICtrlRead($MyCombo)

Don't worry - such mistakes are common at the begining :)

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

thank you for helping me. Unfortunatley it's still not working. here is all of my script

#include<GUIConstantsEx.au3>

#include <IE.au3>

Opt("GUIOnEventMode", 1) ; Change to OnEvent mode

$mainwindow = GUICreate("IE Shortcuts", 500, 500)

GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")

GUISetState(@SW_SHOW)

; TAB

GuiCtrlCreateTab(10, 10, 475, 475)

GuiCtrlCreateTabItem("Internet Shortcuts")

$button1 = GuiCtrlCreateButton("ATG", 15, 40, 100)

GUICtrlSetOnEvent($button1, "ATG")

$button2 = GuiCtrlCreateButton("TimeClock", 15, 70, 100)

GUICtrlSetOnEvent($button2, "TimeClock")

$button3 = GuiCtrlCreateButton("CCHAnswers", 15, 100, 100)

GUICtrlSetOnEvent($button3, "CCHAnswers")

$button4 = GuiCtrlCreateButton("PFXTechSupt", 15, 130, 100)

GUICtrlSetOnEvent($button4, "PFXTechSupt")

$button5 = GuiCtrlCreateButton("PermKey", 15, 160, 100)

GUICtrlSetOnEvent($button5, "PermKey")

$button6 = GuiCtrlCreateButton("DATDownload", 15, 190, 100)

GUICtrlSetOnEvent($button6, "DATDownload")

$button7 = GuiCtrlCreateButton("ConfigStaffSSO", 15, 220, 100)

GUICtrlSetOnEvent($button7, "ConfigStaffSSO")

$button8 = GuiCtrlCreateButton("SSOAccountInfo", 15, 250, 100)

GUICtrlSetOnEvent($button8, "SSOAccountInfo")

$button9 = GuiCtrlCreateButton("Epayroll", 15, 280, 100)

GUICtrlSetOnEvent($button9, "Epayroll")

$button10 = GuiCtrlCreateButton("NewInterim", 15, 310, 100)

GUICtrlSetOnEvent($button10, "NewInterim")

$button11 = GuiCtrlCreateButton("ToCCH", 15, 340, 100)

GUICtrlSetOnEvent($button11, "ToCCH")

$button12 = GuiCtrlCreateButton("WebMail", 15, 370, 100)

GUICtrlSetOnEvent($button12, "WebMail")

$button13 = GuiCtrlCreateButton("WYSIWYG", 15, 400, 100)

GUICtrlSetOnEvent($button13, "WYSIWYG")

$button14 = GuiCtrlCreateButton("CCHUniv", 120, 40, 100)

GUICtrlSetOnEvent($button14, "CCHUniv")

$button15 = GuiCtrlCreateButton("TechSource", 120, 70, 100)

GUICtrlSetOnEvent($button15, "TechSource")

$button16 = GuiCtrlCreateButton("TechDocs", 120, 100, 100)

GUICtrlSetOnEvent($button16, "TechDocs")

$button17 = GuiCtrlCreateButton("Google", 120, 130, 100)

GUICtrlSetOnEvent($button17, "Google")

$button18 = GuiCtrlCreateButton("AutoitForums", 120, 160, 100)

GUICtrlSetOnEvent($button18, "AutoitForums")

GuiCtrlCreateTabItem("2")

$WindowsExplorerbutton = GuiCtrlCreateButton("Windows Explorer", 15, 40, 100)

GUICtrlSetOnEvent($WindowsExplorerbutton, "WindowsExplorerbutton")

$MyCombo = GuiCtrlCreatecombo("Drives", 250, 80, 120, 100)

$varA = GUICtrlRead($MyCombo)

GUICtrlSetData(-1, "A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z")

$wssetup = GuiCtrlCreateButton("wssetup", 320, 145)

GUICtrlSetOnEvent($wssetup, "wssetup")

$wssetup2 = GuiCtrlCreateButton("wssetup2", 320, 175)

GUICtrlSetOnEvent($wssetup2, "wssetup2")

GuiCtrlCreateTabItem("3")

$IExplorerbutton = GuiCtrlCreateButton("Internet Explorer", 320, 145)

GUICtrlSetOnEvent($IExplorerbutton, "IExplorerbutton")

GuiCtrlCreateTabItem("")

While 1

Sleep(1000) ; Idle around

WEnd

Func ATG()

$oIE = _IECreate ("http://alexandriamgt.cch.com/kcenter/ui/default.asp")

EndFunc

Func TimeClock()

$oIE = _IECreate ("http://timeclock/prod/WebClock.do")

EndFunc

Func CCHAnswers()

$oIE = _IECreate ("http://support.cch.com/")

EndFunc

Func PFXTechSupt()

$oIE = _IECreate ("https://prosystemfxsupport.tax.cchgroup.com/")

EndFunc

Func PermKey()

$oIE = _IECreate ("https://prosystemfxsupport.tax.cchgroup.com/permkey/download.aspx")

EndFunc

Func DATDownload()

$oIE = _IECreate ("https://prosystemfxsupport.tax.cchgroup.com/permkey/download.aspx")

EndFunc

Func ConfigStaffSSO()

$oIE = _IECreate ("https://prosystemfxsupport.tax.cchgroup.com/service/accountadmin/configure-users-login-check.asp")

EndFunc

Func SSOAccountInfo()

$oIE = _IECreate ("https://prosystemfxsupport.tax.cchgroup.com/#")

EndFunc

Func Epayroll()

$oIE = _IECreate ("https://epayroll.theworknumber.com/")

EndFunc

Func NewInterim()

$oIE = _IECreate ("file://nanasks11002.na.wkglobal.com/?cm=62&cb=8")

EndFunc

Func ToCCh()

$oIE = _IECreate ("file://165.181.76.202/vol1/SPT/toctr")

EndFunc

Func WebMail()

$oIE = _IECreate ("https://mailna.wkglobal.com/exchweb/bin/auth/owalogon.asp?url=https://mailna.wkglobal.com/exchange/&reason=1")

EndFunc

Func WYSIWYG()

$oIE = _IECreate ("https://efile.prosystemfx.com/main.aspx")

EndFunc

Func CCHUniv()

$oIE = _IECreate ("https://efile.prosystemfx.com/main.aspx")

EndFunc

Func TechSource()

$oIE = _IECreate ("https://efile.prosystemfx.com/main.aspx")

EndFunc

Func TechDocs()

$oIE = _IECreate ("https://efile.prosystemfx.com/main.aspx")

EndFunc

Func Google()

$oIE = _IECreate ("www.google.com")

EndFunc

Func AutoitForums()

$oIE = _IECreate ("http://www.autoitscript.com/forum/index.php")

EndFunc

Func WindowsExplorerbutton()

Run("explorer.exe ", @WindowsDir)

EndFunc

Func wssetup()

Run("$var & :\wfx32\WWSETUP.EXE")

EndFunc

Func wssetup2()

Run("C:\wfx32\WSSETUP.EXE")

EndFunc

Func IExplorerbutton()

$oIE = _IECreate ("www.google.com")

EndFunc

Func CLOSEClicked()

;Note: at this point @GUI_CTRLID would equal $GUI_EVENT_CLOSE,

;and @GUI_WINHANDLE would equal $mainwindow

Exit

EndFunc

hope this helps

Link to comment
Share on other sites

The $varA will need to be set after the combo has changed.

Func wssetup()
    $varA = GUICtrlRead($MyCombo)
    Run("$var & :\wfx32\WWSETUP.EXE")
EndFunc ;==>wssetup

BTW, it's much easier to read code if you enclose it in tags

[tagname]

...code

[/tagname]

You can use tag names of code or autoit.

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...