Jump to content

Problem with gui separator


 Share

Recommended Posts

mmh so im getting syntax error (illegal character) with this code and as far as I know there shouldnt be anything wrong with it :D

$SettingList = GuiCtrlCreateListView("   Setting name    |   Status  |   Client status   |   Location    |   Restarts   |", 10, 50, 490, 190)   
If FileExists("sro_restart.ini") Then
    $SettingName = IniReadSectionNames("sro_restart.ini")
    For $i = 1 To $SettingName[0]
        $SettingName[$i]=GUICtrlCreateListViewItem($SettingName[$i]|$RStatus|$CStatus|$Location|$Restarts|, $SettingList)
    Next
Else
    Global $ListView
    $SettingName = "Example"
    WriteIni()
    $ListView = GUICtrlCreateListViewItem($SettingName|$RStatus|$CStatus|$Location|$Restarts|, $SettingList)
EndIf

error :

ERROR: syntax error (illegal character)
$SettingName = GUICtrlCreateListViewItem($SettingName[$i]|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

ERROR: syntax error (illegal character)
$ListView = GUICtrlCreateListViewItem($SettingName|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Anything obvious Iv missed in there ?

Link to comment
Share on other sites

You GUICtrlCreateListViewItem items is supposed to be in one string. Somthing like this?

$SettingList = GuiCtrlCreateListView("     Setting name     |     Status     |     Client status     |     Location     |     Restarts    |", 10, 50, 490, 190)    
If FileExists("sro_restart.ini") Then
    $SettingName = IniReadSectionNames("sro_restart.ini")
    For $i = 1 To $SettingName[0]
        $SettingName[$i]=GUICtrlCreateListViewItem($SettingName[$i] & "|" & $RStatus &"|" & $CStatus & "|" & $Location & "|" & $Restarts, $SettingList)
    Next
Else
    Global $ListView
    $SettingName = "Example"
    WriteIni()
    $ListView = GUICtrlCreateListViewItem($SettingName &"|" & $RStatus & "|" & $CStatus & "|" & $Location & "|" & $Restarts, $SettingList)
EndIf
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...