Sign in to follow this  
Followers 0
mircea

please help .. and fast it;s even better

9 posts in this topic

#1 ·  Posted (edited)

i really don't know whats the problem the program compiles (or run) the program perfect but when i check the .ini file it's only 5 only @#$@ 5 ... if i use Filewrite the same thing

what's the problem what did i do wrong ? i don't get it :|

#include <GuiConstants.au3>


$Form1 = GUICreate("Program creat de Mircea ", 440, 380, 193, 115)
$Button1 = GUICtrlCreateButton("Salveaza Setarile", 16, 56, 113, 25, 0)
$Label1 = GUICtrlCreateLabel("Winamp ", 40, 24, 78, 17)
$input1 = GUICtrlCreateInput("Ex. 1000 = 1 secunda", 152, 56, 113, 21)
$Label2 = GUICtrlCreateLabel("Introdu Timpul", 160, 24, 103, 17)
$Label3 = GUICtrlCreateLabel("Internet", 32, 128, 64, 17)
$input2 = GUICtrlCreateButton("Porneste Winamp", 16, 88, 113, 25, 0)
$Button2 = GUICtrlCreateButton("Salveaza Internet", 16, 168, 113, 25, 0)
$Label4 = GUICtrlCreateLabel("Introdu cum se numeste actuala conexiune", 184, 128, 215, 33)
$input3 = GUICtrlCreateInput("Ex. rds, internet etc.", 232, 168, 97, 21)
$Label5 = GUICtrlCreateLabel("Username", 192, 208, 76, 17)
$Input4 = GUICtrlCreateInput("Ex. PPPxxxxxx", 272, 208, 97, 21)
$Label6 = GUICtrlCreateLabel("Parola", 208, 248, 50, 17)
$Input5 = GUICtrlCreateInput("", 272, 248, 97, 21)
$Button3 = GUICtrlCreateButton("Verifica", 16, 200, 113, 25, 0)
$Label7 = GUICtrlCreateLabel("Inainte de a apasa Verifica te rog trece toate datele corecte si apasa Salveaza Internet abia apoi verifica  si nu uita sa te deconectezi de la internet", 8, 232, 183, 129)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $nmsg = $Button1
            IniWrite("date_personale.ini","Winamp","timp",$input1)
            

    EndSwitch
WEnd
Edited by mircea

Share this post


Link to post
Share on other sites



IniWrite("date_personale.ini","Winamp","timp",GUICtrlRead($input1))

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

ok now you leave me with my mouth open ....

hmmm ok probably then you will give me some idea for this

ok now i will explain i make a "simple" program that a person will introduce the time when the winamp will start next time when he reboots

and a program that users with PPPoE connection will auto connect when they start the computer

so i make a program that persons will introduce the data, username, password etc. and can you give me some ideas how/what to do to make the program next time he starts the computer to start what he entered ?

i was thinking to make another 2 exe (1 for winamp and 1 for internet) but is there a way to make this one ? or a .vbs ?

LATER EDIT:

I HATE MY KEYBOARD I FOUND OUT THE BUG .... BUT STILL IF SOMEONE CAN EXPLAIN how can i do what i just say up

thank you

Edited by mircea

Share this post


Link to post
Share on other sites

Valuater can you help me with this

the problem is if i click

Salveaza Internet button
it will not save in the .ini file .... why ? i did like it is at the last one

#include <GuiConstants.au3>


$Form1 = GUICreate("Program creat de Mircea ", 440, 380, 193, 115)
$Button1 = GUICtrlCreateButton("Salveaza Setarile", 16, 56, 113, 25, 0)
$Label1 = GUICtrlCreateLabel("Winamp ", 40, 24, 78, 17)
$input1 = GUICtrlCreateInput("Ex. 1000 = 1 secunda", 152, 56, 113, 21)
$Label2 = GUICtrlCreateLabel("Introdu Timpul", 160, 24, 103, 17)
$Label3 = GUICtrlCreateLabel("Internet", 32, 128, 64, 17)
$Button2 = GUICtrlCreateButton("Porneste Winamp", 16, 88, 113, 25, 0)
$Button3 = GUICtrlCreateButton("Salveaza Internet", 16, 168, 113, 25, 0)
$Label4 = GUICtrlCreateLabel("Introdu cum se numeste actuala conexiune", 184, 128, 215, 33)
$input3 = GUICtrlCreateInput("Ex. rds, internet etc.", 232, 168, 97, 21)
$Label5 = GUICtrlCreateLabel("Username", 192, 208, 76, 17)
$Input4 = GUICtrlCreateInput("Ex. PPPxxxxxx", 272, 208, 97, 21)
$Label6 = GUICtrlCreateLabel("Parola", 208, 248, 50, 17)
$Input5 = GUICtrlCreateInput("", 272, 248, 97, 21)
$Button3 = GUICtrlCreateButton("Verifica", 16, 200, 113, 25, 0)
$Label7 = GUICtrlCreateLabel("Inainte de a apasa Verifica te rog trece toate datele corecte si apasa Salveaza Internet abia apoi verifica  si nu uita sa te deconectezi de la internet", 8, 232, 183, 129)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $nmsg = $Button1
            IniWrite("date_personale.ini","Winamp","timp",GUICtrlRead($input1))
        case $nmsg = $Button2
            run("C:\Program Files\Winamp\Winamp.exe")
        case $nmsg = $Button3 
            iniwrite("date_personale.ini","Internet","conexiunea_actuala", guictrlread($input3))
            iniwrite("date_personale.ini","Internet","username",GUICTRLREAD($input4))
            iniwrite("date_personale.ini","Internet","password",GUICTRLREAD($input5))           
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites

Mircea - you have 2 instances of $Button3 in your script - that confuses the hell out of it.

$Button3 = GUICtrlCreateButton("Salveaza Internet", 16, 168, 113, 25, 0)

$Button3 = GUICtrlCreateButton("Verifica", 16, 200, 113, 25, 0)

You better assign another variable to the last button or your script will never save your info in the ini file.

Double (multiple) controls with the same ID ... NO-NO


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

ok now i really look like that cat on your avatar thank you very much for your help

thank you very much

Share this post


Link to post
Share on other sites

Who can tell me what i must change or add to make at this part to write a file like this -> Rasdial X Y Z ( i want space between them and i want to write like in the example i just show

or please tell me what to change or modify ?because i have no clue i just lose 1 and a half hours for this and i still don't know

thank you very much for the help you give it to me till now

case $nmsg = $button4
            filewrite("internet.bat","rasdial")
        ;_filewritetoline("internet.bat",1, Guictrlread($input3), 0)
        ;_filewritetoline("internet.bat",1, Guictrlread($input4), 0)
        ;_filewritetoline("internet.bat",1, Guictrlread($input5), 0)
            filewrite("internet.bat", Guictrlread($input3) & @cr) 
        ;Filewrite("internet.bat", Guictrlread($input4) & @CRLF)
        ;FileWrite("internet.bat", Guictrlread($input5) & @CRLF)

#include <GuiConstants.au3>
#Include <File.au3>

$Form1 = GUICreate("Program creat de Mircea ", 440, 380, 193, 115)
$Button1 = GUICtrlCreateButton("Salveaza Setarile", 16, 56, 113, 25, 0)
$Label1 = GUICtrlCreateLabel("Winamp ", 40, 24, 78, 17)
$input1 = GUICtrlCreateInput("Ex. 1000 = 1 secunda", 152, 56, 113, 21)
$Label2 = GUICtrlCreateLabel("Introdu Timpul", 160, 24, 103, 17)
$Label3 = GUICtrlCreateLabel("Internet", 32, 128, 64, 17)
$Button2 = GUICtrlCreateButton("Porneste Winamp", 16, 88, 113, 25, 0)
$Button3 = GUICtrlCreateButton("Salveaza Internet", 16, 168, 113, 25, 0)
$Label4 = GUICtrlCreateLabel("Introdu cum se numeste actuala conexiune", 184, 128, 215, 33)
$input3 = GUICtrlCreateInput("Ex. rds, internet etc.", 232, 168, 97, 21)
$Label5 = GUICtrlCreateLabel("Username", 192, 208, 76, 17)
$Input4 = GUICtrlCreateInput("Ex. PPPxxxxxx", 272, 208, 97, 21)
$Label6 = GUICtrlCreateLabel("Parola", 208, 248, 50, 17)
$Input5 = GUICtrlCreateInput("", 272, 248, 97, 21)
$Button4 = GUICtrlCreateButton("Verifica", 16, 200, 113, 25, 0)
$Label7 = GUICtrlCreateLabel("Inainte de a apasa Verifica te rog trece toate datele corecte si apasa Salveaza Internet abia apoi verifica  si nu uita sa te deconectezi de la internet", 8, 232, 183, 129)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $nmsg = $Button1
            IniWrite("date_personale.ini","Winamp","timp",GUICtrlRead($input1))
        case $nmsg = $Button2
            run("C:\Program Files\Winamp\Winamp.exe")
        case $nmsg = $Button3 
            iniwrite("date_personale.ini","Internet","conexiunea_actuala", guictrlread($input3))
            iniwrite("date_personale.ini","Internet","username",GUICTRLREAD($input4))
            iniwrite("date_personale.ini","Internet","password",GUICTRLREAD($input5))   
        case $nmsg = $button4
            filewrite("internet.bat","rasdial")
        ;_filewritetoline("internet.bat",1, Guictrlread($input3), 0)
        ;_filewritetoline("internet.bat",1, Guictrlread($input4), 0)
        ;_filewritetoline("internet.bat",1, Guictrlread($input5), 0)
            filewrite("internet.bat", Guictrlread($input3) & @cr) 
        ;Filewrite("internet.bat", Guictrlread($input4) & @CRLF)
        ;FileWrite("internet.bat", Guictrlread($input5) & @CRLF)
            
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites

You need to concatenate what you need written (displayed) using the "&" operator.

$Internet_bat_file = FileOpen(@ScriptDir&"\internet.bat", 2);open the file in mode 2 (write mode and erase previous content
FileWrite($Internet_bat_file, "Rasdial "&GuiCtrlRead($input3)&" "&GuiCtrlRead($input4)&" "&GuiCtrlRead($input5))
FileClose($Internet_bat_file)   ;close the file

Try to understand the solution given to you.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

ah now i get it ..... my god i must start to learn all the commands again because it seems i don't know what to use and were

Thank you very much

now i finish the program and all and my god without you i think i was still at the first part

thank you very much for your help

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