Jump to content

Input box wont type what i want.


Go to solution Solved by careca,

Recommended Posts

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 !

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

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

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

  • Solution

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

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

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

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

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

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.

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

Au3Record.exe

Link to comment
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.

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

Ok, please click solved.

Best regards.

Spoiler

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

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

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

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

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.

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

Au3Record.exe

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...