Jump to content

little fast help about input box :)


Go to solution Solved by JLogan3o13,

Recommended Posts

Posted (edited)

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

  Reveal hidden contents

 

  • Moderators
  • Solution
Posted

$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!

Posted
  On 2/20/2014 at 4:30 PM, jdelaney said:

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

???

lol^^

 

  On 2/20/2014 at 4:31 PM, JLogan3o13 said:
$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

  Reveal hidden contents

 

Posted (edited)
  On 2/20/2014 at 4:33 PM, DicatoroftheUSA said:

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

  Reveal hidden contents

 

Posted

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.
Posted
  On 2/20/2014 at 4:46 PM, jdelaney said:

 

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

  Reveal hidden contents

 

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
×
×
  • Create New...