Jump to content

Recommended Posts

Posted

Doesn't matter when I change mine to "notepad.exe" it still works

@Testy,

Do you get the MsgBox popup with the port number?

No, no popup either.

Posted

No, no popup either.

OK, copy and paste this code (don't change anything!) and save it as an au3 file.

Run it and tell us what happens...

#include <GUIConstants.au3>

; GUI
GuiCreate(" Helpabel", 370, 180)
GuiSetIcon(" ", 0)

;v1.0 - 2/27/08
GuiCtrlCreateLabel("v1.2", 345, 167, 136, 20)

; CONTEXT MENU
$contextMenu = GuiCtrlCreateContextMenu()
GuiCtrlCreateMenuItem("Context Menu", $contextMenu)
GuiCtrlCreateMenuItem("", $contextMenu);separator
GuiCtrlCreateMenuItem("&Properties", $contextMenu)

; TAB
GuiCtrlCreateTab(5, 35, 355, 130)
GuiCtrlCreateTabItem("1")
GuiCtrlCreateLabel("Region 1", 10, 10)

;R1
$Button1r1 = GUICtrlCreateButton("ANC", 15, 65, 40, 20)

; GROUP WITH RADIO BUTTONS
GuiCtrlCreateLabel("Abel Access Type:", 15, 118)
$radio1 = GuiCtrlCreateRadio("36008", 115, 115, 40)
GuiCtrlSetState(-1, $GUI_CHECKED)
$radio2 = GuiCtrlCreateRadio("36005", 165, 115, 40)
$radio3 = GuiCtrlCreateRadio("36009", 215, 115, 40)
GUICtrlCreateGroup ("",-99,-99,1,1) ;close group
GUISetState(@SW_SHOW)


While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $Button1r1
            $port = Port_Select()
            MsgBox(0,"PORT",$port) ; just to see that we got what we want
            ;Run("C:\folder\application.exe appServer=10.0.18.16 appServerPort="&$port&" app=Appl schema=UserSchema")
            Run("Notepad.exe"); appServer=10.0.18.16 appServerPort="&$port&" app=Appl schema=UserSchema")
            ;login()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

func port_select()
    local $i = ''
    $radio1_state = GUICtrlRead($radio1)
    $radio2_state = GUICtrlRead($radio2)
    $radio3_state = GUICtrlRead($radio3)
    Select
        Case $radio1_state = $GUI_CHECKED
            $i = '36008'
        Case $radio2_state = $GUI_CHECKED
            $i = '36005'
        Case $radio_PQ_state = $GUI_CHECKED
            $i = '36009'
    EndSelect
    Return $i
EndFunc
Posted

OK, copy and paste this code (don't change anything!) and save it as an au3 file.

Run it and tell us what happens...

Works. I'll incorporate what you have, and test it. Thank you for the assistance.

Posted

Doesn't matter when I change mine to "notepad.exe" it still works

@Testy,

Do you get the MsgBox popup with the port number?

maybe because you defined GUIGetMsg() as $Msg and he has it declared as $nMsg without making the changes?

@rover It doesn't bloody well matter what application. exe is. That has no bearing on the problem.

@Testy In your last test you didn't put the code in the message loop

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button1r1
     $port = Port_Select()
     Run("C:\folder\application.exe appServer=10.0.18.16 appServerPort="&$port&" app=Appl schema=UserSchema")
     login()
EndSwitch
Wend

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Posted

Works. I'll incorporate what you have, and test it. Thank you for the assistance.

Great!

At least you were trying Testy: we don't mind helping out when we can see the effort you're putting in, even if you're not a master AutoIt-er... yet :)

Posted

Great!

At least you were trying Testy: we don't mind helping out when we can see the effort you're putting in, even if you're not a master AutoIt-er... yet :)

=) I was good with Autoit v2, and I LOVE the fuctionality of v3. It has a steep learning curve for me. I'll get there.

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
×
×
  • Create New...