Jump to content

little fast help about input box :)


caramen
 Share

Go to solution Solved by JLogan3o13,

Recommended Posts

hello guys :)

 

part of my script:

If WinActivate ("Lettres1 - Message","") = True Then
   $Ticket  = InputBox ("Numero de ticket" , "Indiquez votre numero de ticket pour: -Intervention-","" )
   BlockInput(1)
    Send    ("{LSHIFT Down}")
    Sleep   (10)
    Send    ("{TAB}")
    Send    ("{LSHIFT Up}")
    Sleep   (100)
    Send    ($IDe)
    Sleep   (100)
;~  Send    ("{Enter}")
    Sleep   (100)
    Send    ("{TAB}")
    Sleep   (100)
    Send    ($IDestinataire1)
    Sleep   (100)
    Send    ("{;}")
    Send    ($IDestinataire2)
    Sleep   (100)
    Send    ("{;}")
    Send    ("{TAB}")
    Send    ($ICopie1)
    Sleep   (100)
    Send    ("{;}")
    Send    ($ICopie2)
    Sleep   (100)
    Send    ("{;}")
    Send    ("{TAB}")
    Send    ("{DEL}")
    Send    ("{DEL}")
    Send    ("{DEL}")
    Send    ("{DEL}")
    Send    ("{DEL}")
    Send    ("{DEL}")
    Send    ("{DEL}")
    Send    ("{DEL}")
    Send    ($IObjet)
    Send    ($Ticket)
    Send    (")")
    Send    ("{TAB}")
    Send    ("{TAB}")
    Send    ($IMessage)
    Send    ("{ENTER}")
    Send    ($IMessage2)
    Send    ("{ENTER}")
    Send    ($IMessage3)
    Send    ("!i")
    Send    ("s")
    Send    ("{Enter}")
    BlockInput(0)
   EndIf
EndFunc

my script working very nice but i whant to improve it but i dont know how to use the @error on input box

i just whant to make my script do that :in the input box the cancel button is pressed then go to (function): **** ()

Arround line 2 or 3

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

Using sends will not allow you to recieve data from the process you are manipulating.  You would need to use ControlClick, ControlSetText, etc.

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

  • Moderators
  • Solution

$Ticket = InputBox("", "Test")
    If @error = 1 Then
               ;Do stuff
           EndIf

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Using sends will not allow you to recieve data from the process you are manipulating.  You would need to use ControlClick, ControlSetText, etc.

???

lol^^

 

$Ticket = InputBox("", "Test")
    If @error = 1 Then
               ;Do stuff
           EndIf

 

Thx for the syntax have fun ++ :)

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

The help file tells you exactly what @error means when used with the input box. And, it gives an example. Use the help file before cluttering the forum.

lol

-1 ) you are in help forum so answer like that dont got any room here

-2) if you post everywhere like that you should stop reading help forum since this answer is not constructive

 

-3) here is the script in the help file that i consulted before post my topic i ask you to show me in witch line the exemple is here becose YEAH f*king moron i watched the help file before post here .... I cant belea ... nvm you dont worth it cya.

#include <MsgBoxConstants.au3>

Example()

Func Example()
    ; Places the input box in the top left corner displaying the characters as they
    ; are typed.
    Local $sAnswer = InputBox("Question", "Where were you born?", "Planet Earth", "", _
             - 1, -1, 0, 0)

    ; Display the result.
    MsgBox($MB_SYSTEMMODAL, "", $sAnswer)

    ; Asks the user to enter a password.  Don't forget to validate it!
    Local $sPasswd = InputBox("Security Check", "Enter your password.", "", "*")

    ; Display the result.
    MsgBox($MB_SYSTEMMODAL, "", $sPasswd)

    ; Asks the user to enter a 1 or 2 character response.  The M in the password
    ; field indicates that empty string is not accepted and the 2 indicates that the
    ; responce will be at most 2 characters long.
    Local $sValue = InputBox("Testing", "Enter the 1 or 2 character code.", "", " M2")

    ; Display the result.
    MsgBox($MB_SYSTEMMODAL, "", $sValue)
EndFunc   ;==>Example
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

Oops, misread the question.  I'd still look into the functions I suggested, rather than send.

You could have easily found that in the help file though.  Would have required two searches, @error (view the seterror page), and InputBox.

SetError(); shows use of @error in example
Inputbox(); shows specific error returns
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

 

Oops, misread the question.  I'd still look into the functions I suggested, rather than send.

You could have easily found that in the help file though.  Would have required two searches, @error (view the seterror page), and InputBox.

SetError(); shows use of @error in example
Inputbox(); shows specific error returns

 

Good information Thx man :)

I will check that becose it can be realy userfull ... for any kind of use.

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

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

×
×
  • Create New...