Sign in to follow this  
Followers 0
caramen

Input box wont type what i want.

6 posts in this topic

I got this code in a enouth big code to note copy it here...

but say me if you want i will post it completly

but to get things simple i will just ask with little script parts for moment

Func Macro1 ()



    ; Creation de l'interface
    Local $hGUI2 = GUICreate("Création de l'enveloppe", 350, 350)

    ; Creation du formulaire
    Local $iGoo = GUICtrlCreateButton("Goo", 210, 260, 100, 20)

    Local $iNomserveur = GUICtrlCreateInput ("s00v099", 20, 20, 100, 20)
    Local $iProc = GUICtrlCreateInput ("Processeur", 20, 50, 100, 20)
    Local $iSocket = GUICtrlCreateInput ("Socket", 20, 80, 100, 20)
    Local $iRam = GUICtrlCreateInput ("Ram", 20, 110, 100, 20)
    Local $iHDD1 = GUICtrlCreateInput ("HDD1", 20, 140, 100, 20)
    Local $iHDD2 = GUICtrlCreateInput ("HDD2", 20, 170, 100, 20)
    Local $iHDD3 = GUICtrlCreateInput ("HDD3", 20, 200, 100, 20)
    Local $iHDD4 = GUICtrlCreateInput ("HDD4", 20, 230, 100, 20)
    Local $iHDD5 = GUICtrlCreateInput ("HDD5", 20, 260, 100, 20)
    Local $iHDD6 = GUICtrlCreateInput ("HDD6", 20, 290, 100, 20)




    ; Display de l'interface
    GUISetState(@SW_SHOW, $hGUI2)

While (1)


      Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                  ExitLoop

            Case $iGoo

                        WinActivate ("Créer une nouvelle machine virtuelle","")

                        If WinActivate ("Créer une nouvelle machine virtuelle","") then
                           Sleep (1000)

                        WinMove ("Créer une nouvelle machine virtuelle","",0,0)

                        MouseClick("left",232,203,1)
                        Sleep (500)
                        MouseClick("left",573,650,1)
                        Sleep (1500)
                        Send($iNomserveur)


                        ExitLoop

                        EndIf

      EndSwitch


WEnd

GUIDelete ($hGUI2)



   EndFunc

This section is not finish so may you can see some error in the code but here is my question :

Local $iNomserveur = GUICtrlCreateInput ("s00v099", 20, 20, 100, 20)

Send($iNomserveur)

why : Send($iNomserveur) is sending .... "17" and nothing else...

if i try:  Send($iNomserveur&"test") ..... i got "17test"

why $iNomserveur give me 17 insteed of s00v099 like asked here Local $iNomserveur = GUICtrlCreateInput ("s00v099", 20, 20, 100, 20)

i prefer say i dont have modified the input box but i tried with modification like 123 it always sending the value 17 :o !

Share this post


Link to post
Share on other sites



Not sure what you are trying to do but try this instead of your Send()

GUICtrlSetData($iNomserveur, "New Text")

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

it s very easy i just want to any personne who will use my script if they put the value :

s00v09933725

in the GUI input box

Local $iNomserveur = GUICtrlCreateInput ("s00v099", 20, 20, 100, 20)

 

they have to get this value typed in an other windows with that command

Send($iNomserveur)

this is not possible like i did ?

Edited by caramen

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You can't send the value in the inputbox directly...

you have to read it first, then you can use send.

Like this:

$iNomserveur = GUICtrlCreateInput("s00v099", 20, 40, 100, 20)
$Read = GUICtrlRead($iNomserveur)
Send($Read)

Also, if you need to change the value INSIDE the input control, use what Geir1983 sugested.

Edited by careca

Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Share this post


Link to post
Share on other sites

You can't send the value in the inputbox directly...

you have to read it first, then you can use send.

Like this:

$iNomserveur = GUICtrlCreateInput("s00v099", 20, 40, 100, 20)
$Read = GUICtrlRead($iNomserveur)
Send($Read)

Also, if you need to change the value INSIDE the input control, use what Geir1983 sugested.

Best answer Thx man that was what i was looking for.

Share this post


Link to post
Share on other sites

Ok, please click solved.

Best regards.


Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

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