Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all 12506 articles
Browse latest View live

Parse wordfile for name

$
0
0

Hi everyone

 

I've managed to parse a wordfile with regular expressions for an e-mail address. This works very well.

 

Now I would like to parse it for a name. Trouble of course is, how do you parse for a name?!

 

The only thing I have is that the name is allways in the same position and it has a frame around it. Does that help in any way?

 

I've attached the file it should be extracted from it is any help.

 

Thanks for your help!!

Attached Files

  • Attached File  doc.docx   33.13KB   6 downloads

_crypt_hashdata password in script

$
0
0

Hello all, I am trying to "hide" a password in a script. I used the _crypt_hashdata command and created a hash I can use. Once I did that I put that hash into an obscure file on a file share that is secured. I then will have my script call that file and read the line for the hash then use the rest of the script to "decode" the hash and input the password. My issue is I am unable to find a way to actually use the hash and "decrypt" it or use it to grant permissions to the script to run. I'm not sure if decrypt is the right way to put it, but I want to use the hidden password to execute a command as a different user in the script.

 

Thank you.

Use autoit on excel file that is already open.

$
0
0

Is it possible to read data from an excel file that is already open as opposed to reopening the .xlsm file  everytime I run the script?  The spreadsheet I am using is very complex and takes a considerable about of time to calculate  Everytime I edit the autoit script I am reopening the file and waitng for it to calculate and it is taking way too much time.  Does anybody have any suggestions?  Thanks.

Finding Text on html

$
0
0

Ive just started playing around with autoit3 for a while.. and was wondering if i can find a line of text in the html, and execute a command fx. for checking if im logged in or logged out. Im using google chrome but im willing to use IE cause for what ive learned so far is thats what you guys use mostly. Im currently looking into Chrome UDF Plzz keep me updated if you find a way to do this :)

Using AutoIt3 as a testing tool after Jenkins build

$
0
0

I'm a game developer and we're finally getting to the point where I can start working on some tests for my game.

 

I'm kind of familiar with AutoIt3 so I decided to write a script to smoke test my game.

 

We build our game using Jenkins and have a slave Windows Jenkins machine to do any visual tests that need to be done (and also compile the game due to a bug in Unity's -nographics parameter causing the builds to be corrupt without this workaround :P).

 

My question is...is there a way to report to Jenkins the pass/fail results of the smoke test and have it formatted in some way readable to Jenkins?

 

I've been staring at Ant and xUnit stuff (and RobotFramework and a bunch of other stuff) but all that stuff seems confusing and not exactly straight forward :(

understanding GUICtrlSetData

$
0
0
GUICtrlSetData ( controlID, data [, default] )
 
Not sure how to interpret red bold text in the script below. Any help is appreciated.
 
$TestProgress = GUICtrlCreateProgress(665, 460, 200, 20)
GUICtrlSetColor(-1, 32250)
GUICtrlSetData($TestProgress, 35)
.
.
.
.
GUICtrlSetData($TestProgress, 100)
.
.
.
.
GUICtrlSetState($TestProgress,$GUI_Hide)
If GUICtrlRead($LTE4)=1 Then
RUNWAIT($QDir&"NoiseProfilingTool.exe HP_LTE_4_Main.xml run")
;RUNWAIT($QDir&"NoiseProfilingTool.exe HP_LTE_4_Aux.xml run")
EndIf
GUICtrlSetData($TestProgress, 10)
 
If GUICtrlRead($LTE7)=1 Then
RUNWAIT($QDir&"NoiseProfilingTool.exe HP_LTE_7_Main.xml run")
;RUNWAIT($QDir&"NoiseProfilingTool.exe HP_LTE_7_Aux.xml run")
EndIf
GUICtrlSetData($TestProgress, 10)
 
If GUICtrlRead($LTE17)=1 Then
RUNWAIT($QDir&"NoiseProfilingTool.exe HP_LTE_17_Main.xml run")
;RUNWAIT($QDir&"NoiseProfilingTool.exe HP_LTE_17_Aux.xml run")
EndIf
GUICtrlSetData($TestProgress, 20)
 
If GUICtrlRead($LTE2)=1 Then
RUNWAIT($QDir&"NoiseProfilingTool.exe HP_LTE_2_Main.xml run")
;RUNWAIT($QDir&"NoiseProfilingTool.exe HP_LTE_2_Aux.xml run")
EndIf
GUICtrlSetData($TestProgress, 10)
 
If GUICtrlRead($LTE5)=1 Then
RUNWAIT($QDir&"NoiseProfilingTool.exe HP_LTE_5_Main.xml run")
;RUNWAIT($QDir&"NoiseProfilingTool.exe HP_LTE_5_Aux.xml run")
EndIf
GUICtrlSetData($TestProgress, 20)
 
If GUICtrlRead($LTE13)=1 Then
RUNWAIT($QDir&"NoiseProfilingTool.exe HP_LTE_13_Main.xml run")
;RUNWAIT($QDir&"NoiseProfilingTool.exe HP_LTE_13_Aux.xml run")
EndIf
GUICtrlSetData($TestProgress, 5)

autoit recorder

$
0
0

ok so im new to auto it and ive been trying to get the recorder to work correctly. basically what the problem is after i record what i want it to do and try to execute it to test and see if it work the mouse positioning is off of what was recorded. any help would be nice since i have no idea how the recorder mechanics works

SAP installer help

$
0
0

Hello AutoIt community!

I've discovered AutoIt just 2 days ago, and it is amazing how much easier this stuff can make my daily job.

The help file and the forum made a lot of things clear, and I've been playing with it for 2 days in a row now.

 

I'm currently automating some software installations. I can manage to find a way to click the needed buttons most of the time.

Except for an SAP front end installer I want to fully automate.

 

As you can see in my image, I need to click the "Select all"-link I marked in red.

Sadly, the AutoIt WIndow Info app doesn't seem to find a unique identifier to recognize this link, even not the text.

I've try to work around this by specifying the x and y coördinates, but the install screen has a different sizes on different screen sizes, so that's not a solution for me.

 

Does anyone have an idea? Any help would be greatly appreciated!

 

 

SAP%20Front%20End%20Installer.png


Fetching run time menu item text

$
0
0

Hi All,

 

I want to fetch the run time menu item text.

1. I have to right click on a list view item.

2. A pop-up menu with 4 items appears and I have to fetch the text of the menu.

 

Is there any way to perform step 2 using autoit.

 

Any help will be appreciated.

 

Thanks in advance.

 

AutoIT vs VB Net for complex IE automation

$
0
0

Hello guys,

 

I am relatively new still to the programming scene.

 

I am intending to learn a lot in the coming times as I have really taken an interest in this direction.

 

I wish to create a few automation programs to be used for IE, but I do not want to automate the mouse clicks and coordinates.

 

I want to create scripts that can control IE through the "COM" (I think it is called)

 

So they can run in the background and do the following:

  • Navigate around various pages
  • Post text to various pages
  • Download images and upload images

I spoke to a few people and some say to use AutoIT, others say to use VB Net

 

Which is more powerful or more suitable for the task?

 

So in which direction should I put my learning to be more effective?

AutoIT or VB Net?

choice number or word

$
0
0

hi guy

i have  little program , this prog  find  in tex  , this tex  is composed of  phreses  and  number ,  how  is possible    separate  number  in   one  arry  and  phrases in other?? :)

 

thankzz

 

How to Hibernate a script?

$
0
0

My question is very simple, yet I couldn't find any similar reference.

 

I want to run a script I've built, that only uses 2 HotkeySet functions, but I want it to always run in background

waiting for when those keys are pressed.

 

Functionally, I have already achieved this using a "while 1" function with a sleep(30000) that

does the "waiting".

 

Is there a way to truly hibernate a script without using tricks like sleep?

 

Thank you!

Silent installation of software with installShield Setup

$
0
0

Hello,

I am working on one software application having sql server database.
I need to uninstall and install the software frequently which takes lot of time, so i want to automate this process to save time.

few points to be considered for this installation process.

- Application setup.exe file install software with "install shield" wizard ( there are 8-10 screen in setup, Title bar of each screen will be like "AppName" - InstallShield Wizard)

- While installation it asks to select database also, so Database should exist prior installation starts, can we make some setup file (ini/xml)like valued to be entered in input field can be fetched from that file.

- While installation setup will deploy SSRS reports also, so need to specify report server address, can we specify the report server address in setup file (ini/xml) so it can be fetched from there

- While setup title bar of each setup screen will remain same like ""AppName" - Install shield Wizard", Will autoIT be able to identify all screen with same name.

 

Is there any way i can automate this process with AutoIT?
so that my installation can be done faster and easily by one click.

Please advice me, your suggesttions will be very helpful for me.
 
also, please advice if this can be achieved in anyother way.

 

Thanks in Advance,
Ashvin Parmar

Not able to identify the property grid window for visual studio

$
0
0

Hi All,

I want to set the values in the property grid window using autoit. I tried to identify the window property using the AU3Info Spy. but unable to identify the properties in the window.

 

 Open the visual studio 2010, 

please let me know if any addin to add and get the property identify.

 

 

Interface with pushbuttons (physical buttons) ?

$
0
0

I have been asked to interface with physical buttons.

Customer would like to update a controlling device within 1-2 seconds using one or more pushbuttons. Assuming just 3-4 buttons at most for now.

 

Idea is:

 

Push button A ==> send RS232 text "A" to device

Push button B ==> send RS232 text "B" to device

 

etc

 

The size and type of button is not known, but it will be the kind that closes a switch which is normally open. Like an arcade button.

 

I can do it using PC keyboard, but client wants something more industrial. So how to go about this - which port / IO card should I choose, and how do I actually read from such a card ? (or a PC port?)

 

Any experience / example programs welcomed with thanks!


How to take focus automatically by VNC

$
0
0

Hi All,

 

I am running my autoit scripts through jenkins at some specified time at any remote machine.

and at that time my local machine is not ON.

 

I just want to know that can we do something for VNC, that the focus is autoomatically taken by VNC on the remote machine instead we take it manually every day

 

Thanks

 

 

 

 

 

 

 

Problem with InetGet

$
0
0

I'm having trouble with InetGet.
I want to lose the Silverlight.exe with InetGet of this page --- http :/ / www.microsoft.com / getSilverlight / handlers / getsilverlight.ashx
but not successful because the product does not end in. exe file and thus not low at all.
The idea of my script is to download and install the latest vercion of Silverlight.exe
This is part of my code:

AutoIt         
     #include <Math.au3>     #include <GUIConstants.au3>     #include <GUIConstantsEx.au3>     #include <WindowsConstants.au3>     #include <ProgressConstants.au3>     #include <StaticConstants.au3>     TraySetState (2)     $_FinalUrl = 'http://www.microsoft.com/getsilverlight/handlers/getsilverlight.ashx'     $_TempPath = @TempDir & '\Silverlight_Instaler.exe'     $_FileSize = InetGetSize ( $_FinalUrl )     $_Gui = GUICreate ("DOWNLOAD...", 359, 114, 260, 138)     GUISetIcon("@TempDir & '\Silverlight.ico", -1)     GUICtrlCreateLabel("MICROSOFT SILVERLIGHT", 32, 16, 300, 25, $SS_CENTER)     GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")     $_ProgressBar = GUICtrlCreateProgress (48, 40, 254, 33, $PBS_SMOOTH)     GUISetState ( @SW_SHOW )     $_Download = InetGet ( $_FinalUrl, $_TempPath, 1, 1)     Local $_InfoData     Do         $_InfoData = InetGetInfo ( $_Download )         If Not @error Then            $_InetGet = $_InfoData[0]            $_DownloadPercent = Round ( ( 100 * $_InetGet ) / $_FileSize )            $_DownloadPercent = _Min ( _Max ( 1, $_DownloadPercent ), 99 )            GUICtrlSetData ( $_ProgressBar, $_DownloadPercent )            $_Label = GUICtrlCreateLabel ( 'PROGRESS : ' & $_DownloadPercent & ' %', 32, 88, 308, 17, $SS_CENTER )            GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")         EndIf         Sleep ( 100 )     Until $_InfoData[2] = True     $_Label = GUICtrlCreateLabel ( 'DOWNLOAD SUCCESSFULL !', 32, 88, 308, 17 , $SS_CENTER)     GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")     Sleep ( 2000 )     $_Label = GUICtrlCreateLabel ( 'INSTALANDO ESPERE... !', 32, 88, 308, 17 , $SS_CENTER)     GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")     Sleep ( 2000 )     ShellExecuteWait(@TempDir & '\Silverlight_Instaler.exe' , '/q /doNotRequireDRMPrompt /ignorewarnings')

If someone has a great maid solution because all neurons burn no avail.

Sorry for my bad English.

Unable to find key in the registry

$
0
0

Ok I am really stumped here, because I know for a fact that this key exists I am looking right at it, but when autoit reads the registry it insists that this key does not exist. This explains why this cannot be deleted. So my question is am I doing something wrong here? Or is this just a very strange case? I incorperated in the code the ability to report back to me weather or not the this key exists or if it cannot be deleted. I tried this with a batch file and it was not deleting it either. Logically I do not see why it can not be seen in the registry. Perhaps my syntax is wrong or something. Also this was an inhouse application that was virtualized. I did not package this one myself, this was produced before I was working here. I'm asking the experts on this one. Thanks.

 

This is the Key that exists. I used "copy key" : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{306088F1-1D7E-47AF-80AD-2B2625C5AF80}

  1. RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "Uninstall")
  2. $del = RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", "{306088F1-1D7E-47AF-80AD-2B2625C5AF80}")
  3.  
  4. if $del = 2 then
  5.  
  6. msgbox(0, "return code", "registry key was not deleted, there was a problem.")
  7.  
  8. elseif $del = 0 then
  9.  
  10. msgbox(0, "return code", "registry key does not exist.")
  11.  
  12.  
  13. msgbox(0, "return code", "the registry key was deleted.")
  14.  

Send Email - Very Simple

$
0
0

Hello,

 

I like to send an email from my AutoIt script, and I like to have it as simple as possible.

I tried the example from the help file:

#include <Inet.au3> Local $s_SmtpServer = "mysmtpserver.com.au" Local $s_FromName = "My Name" Local $s_FromAddress = "From eMail Address" Local $s_ToAddress = "To eMail Address" Local $s_Subject = "My Test UDF" Local $as_Body[2] $as_Body[0] = "Testing the new email udf" $as_Body[1] = "Second Line" Local $Response = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body) Local $err = @error If $Response = 1 Then     MsgBox(0, "Success!", "Mail sent") Else     MsgBox(0, "Error!", "Mail failed with error code " & $err) EndIf

It returns me: Mail failed with error code 50. 

Why is that?

Helpfile tells me about this:

 

 

 

@error: 1 - Invalid Parameters   2 - Unable to start TCP   3 - Unable to resolve IP   4 - Unable to create socket   5x - Cannot open SMTP session. x indicates the index number of last command issued to the SMTP server.   50x - Cannot send body. x indicates the line number of $as_Body (first line is 0).   5000 - Cannot close SMTP session

 

Where is my error? My credentials and email adress are correct (already checked that twice).

I know there are some large UDF's out there about email sending, but I like to have it as short/simple as possible, so I can understand it properly.

What's wrong with that code?

Screen scraping IE but too tired to find easy commands

$
0
0

I have a rusty background in programming so after spending hours trying code and re-searching the forums and the Help, I've decided I better take a nap and ask for help.

 

I am opening an IE insurance claim screen, then switching over to an excel spreadsheet to get some data.  Pop back over to the IE and populate the fields and submit. (In the grand scheme of things, I'll somehow capture the output, (or open a dialogue (Gui) to have the user get what I need); then loop back to the excel and do it again.

 

I can handle the excel part.  What has been torturing me is how to populate the IE using tags or whatever with ControlSend.  I can make it work with clicks and tabs, but I thought the ControlSend would be more precise.  I'm missing the syntax or this IE form doesn't have what I need.

 

The code is below with my questions:

  • Main question - how to use the ControlSend better
  • 2nd question - I've conquered how to tell if the IE is already open (and open if not) but the diagnostics I put in the bottom don't work when it is open. (So I'm missing something there but its secondary and more a curiosity thing)

Under the code is the output from the diags statements, which I thought would show me the Input fields.  I've tried a dozen different variants of the ControlSend with the "Input tags" (or whatever they are) - but I'm exhausted.  Something isn't clicking in MY head.

 

Code:

Plain Text         
#include <IE.au3> #include <Excel.au3> ; Check for an IE Claim window already signed on and open - if not there, open one If Not (WinExists("[CLASS:IEFrame]", "Claim Inquiry - Windows Internet Explorer")) Then    MsgBox(0, "IE", "Window does not exist - open it")    Local $oInternet = ObjCreate("InternetExplorer.Application")    $oInternet.Navigate("https://www.insurance.com/logon.xhtml") ; Opening a web page that contains a form    $oInternet.Visible = 1 ; Let the guy show himself    WinWaitActive("Log on - Windows Internet Explorer")    Local $oDoc = $oInternet.document ; Example object to test    Local $oForm = $oDoc.forms(0) ; Example object to test    ;Put this in for my own clarification - which hasn't helped    ;MsgBox(0, "", "Interface name of $oInternet is: " & ObjName($oInternet) & @CRLF & _    ;        "Object name of $oInternet is:    " & ObjName($oInternet, 2) & @CRLF & _    ;        "Interface name of $oDoc is:      " & ObjName($oDoc) & @CRLF & _    ;        "Object name of $oDoc is:         " & ObjName($oDoc, 2) & @CRLF & _    ;        "Interface name of $oForm is:     " & ObjName($oForm) & @CRLF & _    ;        "Object name of $oForm is:        " & ObjName($oForm, 2))            Local $handle = WinGetHandle("[CLASS:IEFrame]") ; thought if I started understanding handles, I could grab an already open IE window        WinActivate ("Log on - Windows Internet Explorer")    ;error check    WinWaitActive("Log on - Windows Internet Explorer")    ;error check    send("signon{TAB}password")    sleep(2)    send("{Enter}")    sleep(5); allow time for signon    ; go to claim page    $oInternet.Navigate("https://www.insurance.com/inquiry.xhtml") ; Opening a web page that contains a form    ;error check Else; Claim Window already open    MsgBox(0,"IE","Claim window already open")    local $oInternet = ObjGet("","Claim Inquiry - Windows Internet Explorer") ; Get an existing window    Local $handle = WinGetHandle("[CLASS:IEFrame]", "Claim Inquiry - Windows Internet Explorer")    MsgBox(0, "Handle", $handle) EndIf #cs --->  Run through info in an excel sheet #ce<-------------- ; back to IE WinActivate ($handle) WinWaitActive ($handle) Opt("MouseCoordMode", 2) ;1=absolute, 0=relative, 2=client ControlClick($handle, "", "", "Left", 1,187, 214); click into open field ;**************  Am using Sends or ControlSends, but would like to use ControlSend with a Tag ;Send($Excel_ID) ;Send("{TAB 6}") ;Send($Excel_SD & "{TAB}" & $Excel_SD) ;Send("{Enter}") ; OR ;ControlSend( $handle, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", $Excel_ID) ;sleep(3) ;ControlSend( $handle, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{TAB 6}") ;************* How do I specify the edit area to send to rather than tabbing? ; On a side note ;**********  These work if I create the IE object but fail if the window is already open ;**********  What am I doing wrong? ConsoleWrite("_IETagNameGetCollection Start --------------------------------------------------------"&@CRLF) local $oInputs = _IETagNameGetCollection($oInternet, "Input")     For $oInput in $oInputs         consolewrite(string($oInput.id) & @CRLF) Next ConsoleWrite("_IETagNameGetCollection Stop --------------------------------------------------------"&@CRLF&@CRLF) ConsoleWrite("_IEFormGetCollection Start --------------------------------------------------------"&@CRLF) $oforms = _IEFormGetCollection($oInternet,-1) For $oform In $oforms        ConsoleWrite($oform.id & @CRLF);        $oeles = _IEFormElementGetCollection($oform)        For $oele In $oeles       ConsoleWrite(@TAB & 'Name: ' & $oele.id & ' Tag Type: ' & $oele.tagName &@CRLF)        Next Next ConsoleWrite("_IEFormGetCollection Stop --------------------------------------------------------"&@CRLF&@CRLF) ConsoleWrite("_IETagNameAllGetCollection Start --------------------------------------------------------"&@CRLF) Local $oElements = _IETagNameAllGetCollection($oInternet) For $oElement In $oElements     ;MsgBox(0, "Element Info", "Tagname: " & $oElement.tagname & @CR & "innerText: " & $oElement.innerText) consolewrite("Tagname: " & $oElement.tagname & @CR & "innerText: " & $oElement.innerText & @CRLF) Next ConsoleWrite("_IETagNameAllGetCollection Stop --------------------------------------------------------"&@CRLF)

------------------------------------------------------------------- Ouput from Diags - the fields I want to populate should be the RID, FromDOS and ThruDOS

_IETagNameGetCollection Start --------------------------------------------------------
sakClaim
RID
CLMICN
0
0
CLMICN
FromWarrant
FromDOS
ThruWarrant
ThruDOS
_IETagNameGetCollection Stop --------------------------------------------------------

_IEFormGetCollection Start --------------------------------------------------------
clmInq
    Name: sakClaim Tag Type: INPUT
_IEFormGetCollection Stop --------------------------------------------------------

_IETagNameAllGetCollection Start -------------------------------------------------------- *** This is an abbreviation, but the blue part is what I will be trying to automate the capture of down the road.  If anyone has the time to point me to an example, I'd appreciate it also ***
Tagname: !
innerText: 0
Tagname: HTML
innerText: Claim Inquiry

Main Claims Eligibility Pricing Prior Auth Budgets Trade Files   Account Mailbox Help Log Off .
 Tuesday 19 November 2013 10:46 am

Claim Inquiry: XXXXXX500D
CriteriaMember ID Claim Status Any Status Denied Paid Suspended Resubmit Claim Type Any Inpatient Outpatient Home Health Long Term Care Crossover - Inpatient Crossover - Outpatient Professional Crossover - Professional Dental Pharmacy Compound Drug
Patient Acct. # Date Type: Date of Service Warrant Date
ICN From Date  Thru Date  
 
Search

**** Here is what I will want to scrape - eventually ****
ICNMember IDPatient Acct. #Claim TypeFrom DateThru DateWarrant DateBilled AmountWarrant Amount Status
X999998X
4814976
M############ Professional 20130708 20130708 20130717 31.12 0 Denied
X999999X
4971686
M############ Professional 20130708 20130708 0 31.12 31.12 Paid


PreviousNext
----------------------------------------------------------

Many thanks for any help!

Rusty, tired old SQL programmer

 

Viewing all 12506 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>