Sign in to follow this  
Followers 0
Stefan22

Missing Seperator

19 posts in this topic

#1 ·  Posted (edited)

Ok I got some kind of error maybe anyone knows how to get this fixed and working.

HotKeySet("{F11}", "copysel")
    
    $gui = GUICreate("Verbindings Keuze", 200, 200)
    $doorgaan = GuiCtrlCreateButton("Doorgaan", 25, 160 ,60 ,20)
    $exitbutton = GuiCtrlCreateButton("Sluiten", 115, 160, 60, 20)
    GUISetState() 
    ; ============== H323 ====================
    $r1 GuiCtrlCreateRadio("H323-verbinding", 50, 20, 150, 20)
    ; ============== IPCONF ====================    
    $r2 GuiCtrlCreateRadio("IPCONF-lijn", 50, 45, 150, 20)
    ;============== RASPPoE ====================    
    $r3 GuiCtrlCreateRadio("RASPPPoE Line0000", 50, 70, 150, 20)
    ;============== RAS VPN ====================    
    $r4 GuiCtrlCreateRadio("RAS VPN-lijn 0", 50, 95, 150, 20)
    ;============== WAN-minipoort ====================  
    $r5 GuiCtrlCreateRadio("WAN-minipoort (L2TP)", 50, 120, 150, 20)
    
While 1
    Sleep(50)
    $msg = GUIGetMsg()
    If $msg = $exitbutton Then ExitLoop 
    If $msg = $doorgaan Then Run("C:\Documents and Settings\Make drop\MAKEDROP.exe")
    If $msg = $r1 Then ControlCommand("MAKEDROP", "", <<ComboBox1>>, "SelectString", GUICtrlRead($r1))
    If $msg = $r2 Then ControlCommand("MAKEDROP", "", <<ComboBox1>>, "SelectString", GUICtrlRead($r2))
    If $msg = $r3 Then ControlCommand("MAKEDROP", "", <<ComboBox1>>, "SelectString", GUICtrlRead($r3))
    If $msg = $r4 Then ControlCommand("MAKEDROP", "", <<ComboBox1>>, "SelectString", GUICtrlRead($r4))
    If $msg = $r5 Then ControlCommand("MAKEDROP", "", <<ComboBox1>>, "SelectString", GUICtrlRead($r5))
WEnd

Func copysel()
    $selected = ControlCommand("", "", "Edit1", "GetSelected", "")
    ControlCommand("MAKEDROP", "", "Edit1", "EditPaste", $selected)
    Sleep(500)
    ControlClick("MAKEDROP", "&Start", 1007, "left", "1")
EndFunc

Exit

This is the ERROR:

C:\Documents and Settings\abc.au3 (23) : ==> Missing separator character after keyword.:

If $msg = $r1 Then ControlCommand("MAKEDROP", "", <<ComboBox1>>, "SelectString", GUICtrlRead($r1))

If $msg = $r1 Then ControlCommand("MAKEDROP", "", <<ComboBox1^ ERROR

>Exit code: 1 Time: 0.221

Edited by Stefan22

Share this post


Link to post
Share on other sites



Have you tried it with quotes instead of "<<" and ">>", I'm not sure if that's the problem cause I've never used ControlCommand before.

If $msg = $r1 Then ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r1))
If $msg = $r2 Then ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r2))
If $msg = $r3 Then ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r3))
If $msg = $r4 Then ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r4))
If $msg = $r5 Then ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r5))

Share this post


Link to post
Share on other sites

Have you tried it with quotes instead of "<<" and ">>", I'm not sure if that's the problem cause I've never used ControlCommand before.

If $msg = $r1 Then ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r1))
If $msg = $r2 Then ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r2))
If $msg = $r3 Then ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r3))
If $msg = $r4 Then ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r4))
If $msg = $r5 Then ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r5))
Still the same problem about the missing Seperator..

Share this post


Link to post
Share on other sites

I've noticed some errors in your script, fixes posted below.

; ============== H323 ====================
$r1 GuiCtrlCreateRadio("H323-verbinding", 50, 20, 150, 20)
; ============== IPCONF ====================   
$r2 GuiCtrlCreateRadio("IPCONF-lijn", 50, 45, 150, 20)
;============== RASPPoE ====================   
$r3 GuiCtrlCreateRadio("RASPPPoE Line0000", 50, 70, 150, 20)
;============== RAS VPN ====================   
$r4 GuiCtrlCreateRadio("RAS VPN-lijn 0", 50, 95, 150, 20)
;============== WAN-minipoort ==================== 
$r5 GuiCtrlCreateRadio("WAN-minipoort (L2TP)", 50, 120, 150, 20)oÝ÷ Ù8h±éÞyÛ-窹©l²('jÆÞºÚ"µÍÈOOOOOOOOOOOOOHÌÈOOOOOOOOOOOOOOOOOOOBÌÍÜHHÝZPÝÜX]TY[Ê  ][ÝÒÌË][[É][ÝË
LML
BÈOOOOOOOOOOOOOHTÓÓOOOOOOOOOOOOOOOOOOOHÌÍÜHÝZPÝÜX]TY[Ê    ][ÝÒTÓÓ[Z][ÝË
L

KML
BÏOOOOOOOOOOOOOHTÔÑHOOOOOOOOOOOOOOOOOOOHÌÍÜÈHÝZPÝÜX]TY[Ê ][ÝÔTÔÑH[L  ][ÝË
L
ÌML
BÏOOOOOOOOOOOOOHTÈOOOOOOOOOOOOOOOOOOOHÌÍÜHÝZPÝÜX]TY[Ê  ][ÝÔTÈ[Z ][ÝË
LMKML
BÏOOOOOOOOOOOOOHÐS[Z[ÛÜOOOOOOOOOOOOOOOOOOOHÌÍÜHHÝZPÝÜX]TY[Ê  ][ÝÕÐS[Z[ÛÜ

I][ÝË
LLML

I'm sure I found something else but can't remember now, I'll edit this post if I remember :)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I've noticed some errors in your script, fixes posted below.

; ============== H323 ====================
$r1 GuiCtrlCreateRadio("H323-verbinding", 50, 20, 150, 20)
; ============== IPCONF ====================   
$r2 GuiCtrlCreateRadio("IPCONF-lijn", 50, 45, 150, 20)
;============== RASPPoE ====================   
$r3 GuiCtrlCreateRadio("RASPPPoE Line0000", 50, 70, 150, 20)
;============== RAS VPN ====================   
$r4 GuiCtrlCreateRadio("RAS VPN-lijn 0", 50, 95, 150, 20)
;============== WAN-minipoort ==================== 
$r5 GuiCtrlCreateRadio("WAN-minipoort (L2TP)", 50, 120, 150, 20)
Hmm what did u change here? ^^ Edited by Stefan22

Share this post


Link to post
Share on other sites

; ============== H323 ====================
$r1 EQUALS HERE GuiCtrlCreateRadio("H323-verbinding", 50, 20, 150, 20)
; ============== IPCONF ====================   
$r2 EQUALS HERE GuiCtrlCreateRadio("IPCONF-lijn", 50, 45, 150, 20)
;============== RASPPoE ====================   
$r3 EQUALS HEREGuiCtrlCreateRadio("RASPPPoE Line0000", 50, 70, 150, 20)
;============== RAS VPN ====================   
$r4 ETC GuiCtrlCreateRadio("RAS VPN-lijn 0", 50, 95, 150, 20)
;============== WAN-minipoort ====================
$r5 ETC GuiCtrlCreateRadio("WAN-minipoort (L2TP)", 50, 120, 150, 20)

Share this post


Link to post
Share on other sites

; ============== H323 ====================
$r1 EQUALS HERE GuiCtrlCreateRadio("H323-verbinding", 50, 20, 150, 20)
; ============== IPCONF ====================   
$r2 EQUALS HERE GuiCtrlCreateRadio("IPCONF-lijn", 50, 45, 150, 20)
;============== RASPPoE ====================   
$r3 EQUALS HEREGuiCtrlCreateRadio("RASPPPoE Line0000", 50, 70, 150, 20)
;============== RAS VPN ====================   
$r4 ETC GuiCtrlCreateRadio("RAS VPN-lijn 0", 50, 95, 150, 20)
;============== WAN-minipoort ====================
$r5 ETC GuiCtrlCreateRadio("WAN-minipoort (L2TP)", 50, 120, 150, 20)
Ah yes I see, damn im stupid xD Well changed that and its going to my other program now. Except 1 small problem still remains. If I select for example the WAN-minipoort radiobutton, it goes to the program but still the program starts with the H323-verbinding. Now I want to know, is it possible to make the program run with the WAN-minipoort?

Share this post


Link to post
Share on other sites

Hey,

I fixed up your script a bit.

#include <GUIConstants.au3>

HotKeySet("{F11}", "copysel")
    
$gui = GUICreate("Verbindings Keuze", 200, 200)
$doorgaan = GuiCtrlCreateButton("Doorgaan", 25, 160 ,60 ,20)
$exitbutton = GuiCtrlCreateButton("Sluiten", 115, 160, 60, 20)
; ============== H323 ====================
$r1 = GuiCtrlCreateRadio("H323-verbinding", 50, 20, 150, 20)
; ============== IPCONF ====================    
$r2 = GuiCtrlCreateRadio("IPCONF-lijn", 50, 45, 150, 20)
;============== RASPPoE ====================    
$r3 = GuiCtrlCreateRadio("RASPPPoE Line0000", 50, 70, 150, 20)
;============== RAS VPN ====================    
$r4 = GuiCtrlCreateRadio("RAS VPN-lijn 0", 50, 95, 150, 20)
;============== WAN-minipoort ====================  
$r5 = GuiCtrlCreateRadio("WAN-minipoort (L2TP)", 50, 120, 150, 20)
    
While 1
    $nMsg = GUIGetMsg()
    Select
    Case $nMsg = $exitbutton
          Exit
    Case $nMsg = $doorgaan
          Run("C:\Documents and Settings\Make drop\MAKEDROP.exe")
    Case $nMsg = $r1
          ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r1))
    Case $nMsg = $r2
          ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r2))
    Case $nMsg = $r3
          ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r3))
    Case $nMsg = $r4
          ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r4))
    Case $nMsg = $r5
          ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r5))
    EndSelect
WEnd

Func copysel()
    $selected = ControlCommand("", "", "Edit1", "GetSelected", "")
    ControlCommand("MAKEDROP", "", "Edit1", "EditPaste", $selected)
    Sleep(500)
    ControlClick("MAKEDROP", "&Start", 1007, "left", "1")
EndFunc

Hope it works.

-AlmarM-


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

The script runs, but I dont see the GUI, the radiobuttons, buttons etc.

Share this post


Link to post
Share on other sites

The script runs, but I dont see the GUI, the radiobuttons, buttons etc.

You have to call GUISetState() after GuiCreate().

Share this post


Link to post
Share on other sites

You have to call GUISetState() after GuiCreate().

Ya, found that out about 3 minutes ago xD wanted to edit last post but ok. Well now the problem is wether I select IPCONF-lijn or H323-verbinding, the program still always starts with H323. Is it possible to change that. Thats why i made the radiobuttons in the first place.

Share this post


Link to post
Share on other sites

Hey,

I fixed up your script a bit.

#include <GUIConstants.au3>

HotKeySet("{F11}", "copysel")
    
$gui = GUICreate("Verbindings Keuze", 200, 200)
$doorgaan = GuiCtrlCreateButton("Doorgaan", 25, 160 ,60 ,20)
$exitbutton = GuiCtrlCreateButton("Sluiten", 115, 160, 60, 20)
; ============== H323 ====================
$r1 = GuiCtrlCreateRadio("H323-verbinding", 50, 20, 150, 20)
; ============== IPCONF ====================    
$r2 = GuiCtrlCreateRadio("IPCONF-lijn", 50, 45, 150, 20)
;============== RASPPoE ====================    
$r3 = GuiCtrlCreateRadio("RASPPPoE Line0000", 50, 70, 150, 20)
;============== RAS VPN ====================    
$r4 = GuiCtrlCreateRadio("RAS VPN-lijn 0", 50, 95, 150, 20)
;============== WAN-minipoort ====================  
$r5 = GuiCtrlCreateRadio("WAN-minipoort (L2TP)", 50, 120, 150, 20)
    
While 1
    $nMsg = GUIGetMsg()
    Select
    Case $nMsg = $exitbutton
          Exit
    Case $nMsg = $doorgaan
          Run("C:\Documents and Settings\Make drop\MAKEDROP.exe")
    Case $nMsg = $r1
          ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r1))
    Case $nMsg = $r2
          ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r2))
    Case $nMsg = $r3
          ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r3))
    Case $nMsg = $r4
          ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r4))
    Case $nMsg = $r5
          ControlCommand("MAKEDROP", "", "ComboBox1", "SelectString", GUICtrlRead($r5))
    EndSelect
WEnd

Func copysel()
    $selected = ControlCommand("", "", "Edit1", "GetSelected", "")
    ControlCommand("MAKEDROP", "", "Edit1", "EditPaste", $selected)
    Sleep(500)
    ControlClick("MAKEDROP", "&Start", 1007, "left", "1")
EndFunc

Hope it works.

-AlmarM-

Oops forgot it!

-AlmarM-


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

You aren't even using the radio buttons correctly. Find GUICtrlCreateRadio in the help file.

Help file example:

#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)

Example()

Func  Example()
    Local $radio1, $radio2, $msg
    GUICreate("My GUI radio")  ; will create a dialog box that when displayed is  centered

    $radio1 = GUICtrlCreateRadio("Radio 1", 10,  10,  120,  20)
     $radio2 = GUICtrlCreateRadio("Radio  2", 10, 40, 120, 20)
    GUICtrlSetState($radio2, $GUI_CHECKED)

     GUISetState()       ; will display an  dialog box with 1  checkbox

    ; Run the GUI  until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED
                MsgBox(64, 'Info:', 'You clicked the Radio 1  and it is Checked.')
             Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED
                MsgBox(64, 'Info:', 'You clicked on Radio 2  and it is Checked.')
         EndSelect
    WEnd
EndFunc    ;==>Example

Share this post


Link to post
Share on other sites

You aren't even using the radio buttons correctly. Find GUICtrlCreateRadio in the help file.

Help file example:

#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)

Example()

Func  Example()
    Local $radio1, $radio2, $msg
    GUICreate("My GUI radio")  ; will create a dialog box that when displayed is  centered

    $radio1 = GUICtrlCreateRadio("Radio 1", 10,  10,  120,  20)
     $radio2 = GUICtrlCreateRadio("Radio  2", 10, 40, 120, 20)
    GUICtrlSetState($radio2, $GUI_CHECKED)

     GUISetState()       ; will display an  dialog box with 1  checkbox

    ; Run the GUI  until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED
                MsgBox(64, 'Info:', 'You clicked the Radio 1  and it is Checked.')
             Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED
                MsgBox(64, 'Info:', 'You clicked on Radio 2  and it is Checked.')
         EndSelect
    WEnd
EndFunc    ;==>Example
Is there any chance u could make an example of one of my radiobuttons?

Share this post


Link to post
Share on other sites

This is how I would do it, to make it like an html form where every radio button has the same name but a different value:

#include <GUIConstantsEx.au3>

GUICreate("My GUI radio") ; will create a dialog box that when displayed is centered
GUISetState()

Dim $RadioGroup1[5][2]

$doorgaan = GuiCtrlCreateButton("Doorgaan", 25, 160 ,60 ,20)
$exitbutton = GuiCtrlCreateButton("Sluiten", 115, 160, 60, 20)
; ============== H323 ====================
$RadioGroup1[0][0] = GuiCtrlCreateRadio("H323-verbinding", 50, 20, 150, 20)
$RadioGroup1[0][1] = 0
; ============== IPCONF ====================   
$RadioGroup1[1][0] = GuiCtrlCreateRadio("IPCONF-lijn", 50, 45, 150, 20)
$RadioGroup1[1][1] = 1
;============== RASPPoE ====================   
$RadioGroup1[2][0] = GuiCtrlCreateRadio("RASPPPoE Line0000", 50, 70, 150, 20)
$RadioGroup1[2][1] = 2
;============== RAS VPN ====================   
$RadioGroup1[3][0] = GuiCtrlCreateRadio("RAS VPN-lijn 0", 50, 95, 150, 20)
$RadioGroup1[3][1] = 3
;============== WAN-minipoort ==================== 
$RadioGroup1[4][0] = GuiCtrlCreateRadio("WAN-minipoort (L2TP)", 50, 120, 150, 20)
$RadioGroup1[4][1] = 4


While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $doorgaan
            MsgBox(0,"",GetRadioGroupValue($RadioGroup1))
    EndSwitch
WEnd

;Loop through first dimenion of radio button handles, return value from second dimension upon match
Func GetRadioGroupValue($aRadioGroup)
    For $X = 0 to Ubound($aRadioGroup)-1
        If BitAND(GUICtrlRead($aRadioGroup[$X][0]), $GUI_CHECKED) Then Return $aRadioGroup[$X][1]
    Next
    Return -1
EndFunc

Share this post


Link to post
Share on other sites

This is how I would do it, to make it like an html form where every radio button has the same name but a different value:

#include <GUIConstantsEx.au3>

GUICreate("My GUI radio") ; will create a dialog box that when displayed is centered
GUISetState()

Dim $RadioGroup1[5][2]

$doorgaan = GuiCtrlCreateButton("Doorgaan", 25, 160 ,60 ,20)
$exitbutton = GuiCtrlCreateButton("Sluiten", 115, 160, 60, 20)
; ============== H323 ====================
$RadioGroup1[0][0] = GuiCtrlCreateRadio("H323-verbinding", 50, 20, 150, 20)
$RadioGroup1[0][1] = 0
; ============== IPCONF ====================   
$RadioGroup1[1][0] = GuiCtrlCreateRadio("IPCONF-lijn", 50, 45, 150, 20)
$RadioGroup1[1][1] = 1
;============== RASPPoE ====================   
$RadioGroup1[2][0] = GuiCtrlCreateRadio("RASPPPoE Line0000", 50, 70, 150, 20)
$RadioGroup1[2][1] = 2
;============== RAS VPN ====================   
$RadioGroup1[3][0] = GuiCtrlCreateRadio("RAS VPN-lijn 0", 50, 95, 150, 20)
$RadioGroup1[3][1] = 3
;============== WAN-minipoort ==================== 
$RadioGroup1[4][0] = GuiCtrlCreateRadio("WAN-minipoort (L2TP)", 50, 120, 150, 20)
$RadioGroup1[4][1] = 4


While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $doorgaan
            MsgBox(0,"",GetRadioGroupValue($RadioGroup1))
    EndSwitch
WEnd

;Loop through first dimenion of radio button handles, return value from second dimension upon match
Func GetRadioGroupValue($aRadioGroup)
    For $X = 0 to Ubound($aRadioGroup)-1
        If BitAND(GUICtrlRead($aRadioGroup[$X][0]), $GUI_CHECKED) Then Return $aRadioGroup[$X][1]
    Next
    Return -1
EndFunc
Ok thanks, but how do I make them go to my other program for example? Because now I get the message 1,2,3,4,5. I need them to go to my other program ^^

Share this post


Link to post
Share on other sites

What value are you sending with ControlCommand? The name of the radio button?

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

What value are you sending with ControlCommand? The name of the radio button?

Hmm what do u mean? U made radiogroups, how should I use those?

EDIT1: Or does anyone else have a solution how to make the RadioButtons select the right function from the droplist in my program.

Edited by Stefan22

Share this post


Link to post
Share on other sites

I already edited my last post but since no-one gave a reply I'll have to BUMP my post.

So here ya go:

BUMP

Someone has to know this Im sure of it.

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  
Followers 0