Jump to content
Sign in to follow this  
julmae

Problem with gui separator

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 ?

Share this post


Link to post
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

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  

×
×
  • Create New...