Sign in to follow this  
Followers 0
ngskicker

Help my script

4 posts in this topic

do someone know short script of this

Func Button5A() ; Load set
    $FileOpen = FileOpenDialog("Open Set", "DATA\", "Setup (*.ini)", 2)
    If @error Then
    Else
        $Load1 = IniRead($FileOpen,"details","id01","")
        $Load2 = IniRead($FileOpen,"details","id02","")
        $Load3 = IniRead($FileOpen,"details","id03","")
        $Load4 = IniRead($FileOpen,"details","id04","")
        $Load5 = IniRead($FileOpen,"details","id05","")
        $Load6 = IniRead($FileOpen,"details","id06","")
        $Load7 = IniRead($FileOpen,"details","id07","")
        $Load8 = IniRead($FileOpen,"details","id08","")
        $Load9 = IniRead($FileOpen,"details","id09","")
        $Load0 = IniRead($FileOpen,"details","id00","")
        $LoadP = IniRead($FileOpen,"details","pass","")
        GUICtrlSetData($Input1A,$Load1)
        GUICtrlSetData($Input2A,$Load1)
        GUICtrlSetData($Input3A,$Load2)
        GUICtrlSetData($Input4A,$Load3)
        GUICtrlSetData($Input5A,$Load4)
        GUICtrlSetData($Input6A,$Load5)
        GUICtrlSetData($Input7A,$Load6)
        GUICtrlSetData($Input8A,$Load7)
        GUICtrlSetData($Input9A,$Load8)
        GUICtrlSetData($Input0A,$Load9)
        GUICtrlSetData($PasswdA,$LoadP)
        $Uname1 = GUICtrlRead($Input1A)
        $Uname2 = GUICtrlRead($Input2A)
        $Uname3 = GUICtrlRead($Input3A)
        $Uname4 = GUICtrlRead($Input4A)
        $Uname5 = GUICtrlRead($Input5A)
        $Uname6 = GUICtrlRead($Input6A)
        $Uname7 = GUICtrlRead($Input7A)
        $Uname8 = GUICtrlRead($Input8A)
        $Uname9 = GUICtrlRead($Input9A)
        $Uname0 = GUICtrlRead($Input0A)
        $Pass = GUICtrlRead($PasswdA)
        IniWrite("setup.ini","details","id01",$Uname1)
        IniWrite("setup.ini","details","id02",$Uname2)
        IniWrite("setup.ini","details","id03",$Uname3)
        IniWrite("setup.ini","details","id04",$Uname4)
        IniWrite("setup.ini","details","id05",$Uname5)
        IniWrite("setup.ini","details","id06",$Uname6)
        IniWrite("setup.ini","details","id07",$Uname7)
        IniWrite("setup.ini","details","id08",$Uname8)
        IniWrite("setup.ini","details","id09",$Uname9)
        IniWrite("setup.ini","details","id00",$Uname0)
        IniWrite("setup.ini","details","pass",$Pass)
    EndIf
EndFunc

Share this post


Link to post
Share on other sites



This is not tested, but I think it should work.

Func Button5A() ; Load set
    $FileOpen = FileOpenDialog("Open Set", "DATA\", "Setup (*.ini)", 2)
    If @error Then
    Else
        For $i = 0 To 9
            $Load = IniRead($FileOpen, "details", "id0" & $i, "")
            GUICtrlSetData(Eval("Input" & $i & "A"), $Load)
            $Uname = GUICtrlRead(Eval("Input" & $i & "A"))
            IniWrite("setup.ini", "details", "id0" & $i, $Uname)
        Next

        $LoadP = IniRead($FileOpen, "details", "pass", "")
        GUICtrlSetData($PasswdA, $LoadP)
        $Pass = GUICtrlRead($PasswdA)
        IniWrite("setup.ini", "details", "pass", $Pass)
    EndIf
EndFunc   ;==>Button5A

Share this post


Link to post
Share on other sites

lol nice work big_daddy ;]

Func Button5A() ; Load set
    $FileOpen = FileOpenDialog("Open Set", "DATA\", "Setup (*.ini)", 2)
    If @error Then
    Else
        $LoadP = IniRead($FileOpen,'details','pass','')
        GUICtrlSetData($PasswdA,$LoadP)
        $Pass = GUICtrlRead($PasswdA)
        IniWrite('setup.ini','details','pass',$Pass)
        
        For $i = 0 To 9
            Assign('Load' & $i, IniRead($FileOpen, 'details', 'id0' & $i, '')
            GUICtrlSetData(Eval('Input' & $i & 'A') , Eval('Load' & $i))
            Assign('Uname' & $i, GUICtrlRead(Eval('Input' & $i & 'A')))
            IniWrite('setup.ini','details','id0' & $i,Eval('Uname' & $i))
        Next
    EndIf
EndFunc

Share this post


Link to post
Share on other sites

lol nice work big_daddy ;]

Thanks, you too!

Both examples get the job done.

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