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

Ttying to figure out how to make a simple macro.

$
0
0
I got this autoit because a friend recommended it for a macro because regular macro recorders were not working. I'm trying to fgiure out how to make a simple macro that'll repeat pressing leftmouseclick, numpad 4, and enter every 250 ms

Help for a Beginner - Multiple IE doing some stuff

$
0
0
Hello everybody, I' am a beginner so excuse me  if my question is banal.
I need to speed up a process. I get data from a website ad I store in a excel file but the process is too slow (mainly because website is very slow)
I thought that the simplest way was to paralellize activity and open more session of the browser.

Is there a way to create an array of IE session and make these working simultaneously (calling the same functions)
I didn't find the way to declare it and start a loop for the different objects at the same moment.

Could you help me?

Thanks in advance.

Stefano

How to AES in AutoIt?

$
0
0
Dear All,

I've been learning about AES encryption and I want to try my hand at using it in AutoIT.  However I keep wondering if it really is as easy as using the UDF by Adventurer here.

As Melba23 says here:

Quote

- Your plain language script is within the compiled .exe, but in compressed form. It is not immediately viewable with a hex editor, but is by no means secure as it is expanded in memory when the .exe is run.

- Obfuscator (part of the full SciTE4AutoIt3 package) will obscure your script by changing variable and constant names (and a lot more!), which makes it harder to decompile but again does not render the .exe secure.

So, compiling an Autoit script will prevent quick snooping, but a determined, experienced hacker can relatively easily get your source - including passwords, specific filenames, etc - or the encryption routines you have used in your script to encrypt/decrypt them if they are stored in another file.

The 'relatively easy' remark by Melba23 makes me wonder what the point of the whole exercise is since ultimately what you are doing is leaving the key in the open with the code:

[ autoit ]      
$Key = "ThisIsTheKey"

The show is over once a hacker has reversed your AutoIt code and gets the string "ThisIsTheKey".

Is this line of logic correct?  Perhaps I'm missing something here?  Any help filling in the blanks here with examples is greatly appreciated.

-icu

Autoit command to clear all or even specific cookies from IE.

$
0
0
Is there a programming code in autoit that will allow me to command cookies clear for one or all cookies at will... when using the program I would like to clear my cookies periodically while my autoit script is running... Thanks

Please help me! CallDll.

$
0
0
I want to use IR device with usb-uirt.

I have read the USB-UIRT API documentation,and can be use UUIRTGetDrvVersion.

But I don't know how to use Transmit and Receive.

I try this code...

$result= DllCall($dll,"UINT_PTR","UUIRTTransmitIR","int",$hndl,"str","0000","hwnd",0x0010,"int",1,"int",0,"int",0,"uint",0,"uint",0)

But read array value always is 0.

Found Call uuirtdrv.dll founction List:
1.Receiver : UUIRTSetReceiveCallback
2.Send :  UUIRTTransmitIR

USBUirt Dll API documentation
http://ccnicolas.free.fr/domotique/apiuirt.htm

UUIRTSetReceiveCallback
UUIRTDRV_API BOOL PASCAL UUIRTSetReceiveCallback(HUUHANDLE hHandle, PUUCALLBACKPROC receiveProc, void *userData);
Registers a receive callback function which the driver will call when an IR code is received from the air. receiveProc should contain the address of a PUUCALLBACKPROC function defined as :
typedef void (WINAPI *PUUCALLBACKPROC) (char *IREventStr, void *userData);
When the USB-UIRT receives a code from the air, it will call the callback function with a null-terminated, twelve-character (like IRMAN) ir code in IREventStr. The driver will also pass the parameter userData, which is a general-purpose 32-bit value supplied by the caller to UUIRTSetReceiveCallback. This parameter is useful for carrying context information, etc. Note that the types of codes which are passed to IREventStr are *not* the same as the type of codes passed back from a UUIRTLearnIR call (the codes from a UUIRTLearnIR are much larger and contain all the necessary data to reproduce a code, whereas the codes passed to IREventStr are simpler representations of IR codes only long enough to be unique).

UUIRTTransmitIR
UUIRTDRV_API BOOL PASCAL UUIRTTransmitIR(HUUHANDLE hHandle, char *IRCode, int codeFormat, int repeatCount, int inactivityWaitTime, HANDLE hEvent, void *reserved0, void *reserved1);
Transmits an IR code via the USB-UIRT hardware. The IR code is a null-terminated *string*. codeFormat is a format specifier which identifies the format of the IRCode code. Currently, supported formats are Compressed_UIRT (STRUCT), RAW, and Pronto-RAW. RepeatCount indicates how many iterations of the code should be sent (in the case of a 2-piece code, the first stream is sent once followed by the second stream sent repeatCount times). InactivityWaitTime is the time in milliseconds since the last received IR activity to wait before sending an IR code -- normally pass 0 for this parameter. hEvent is an optional event handle which is obtained by a call to CreateEvent. If hEvent is NULL, the call to UUIRTTransmitIR will block and not return until the IR code has been fully transmitted to the air. If hEvent is not NULL, it must be a valid Windows event hande. In this case, UUIRTTransmitIR will return immediately and when the IR stream has completed transmission this event will be signalled by the driver. The last parameters, labelled 'reservedx' are for future expansion and should be NULL.

Attached is dll file.

Everybody Please help me.

Thank!

Attached Files

Executing Embedded Executable with DLL libraries?

$
0
0
Hello,

I'm just starting out with AutoIt and I'm loving it so far. Great scripting language. I have a question regarding my thread title, as I have searched the forum but couldn't find what I was looking for or have missed it most likely, so excuse me if I have.

However I have an application that depends on 2 .DLL files in order for it to run. I'm curious as to how I can have all 3 of these stored as resources to be executed to memory without being extracted to the disk. This is more for a learning experience with AutoIt, as I'm not concerned with storing the files to a temporary location and then called as I've already done this, but just looking for an alternative method.

So how can I map these resources to memory?

Cheers! :)

Search Strings and Compare

$
0
0
Hello AutoIT MPVs,

Can somebody help me how to search a value of an element in xml file and compare with a value of an element in other xml file within the directory and creates a log file if error or match.

e.g.

The element to look for is <url> and the value is http://some-url.com - 1st xml
The element to look for is <website> and the value is http://some-url.com - 2nd xml

Please I need it badly. Thanks.

Parsing data from Outlook email

$
0
0
So the situation is as following:

- The kind of email I get is report (daily statistics)
- I want to extract relevant data into DB or Excel, so later I can generate monthly/yearly report based on it.
- I would like extracted table Breakdown of Syslog messages by severity and Kiwi Syslog Server Statistics, I would let Breakdown by sending host out of parsing.
- I am aware of Outlook UDF and ability to read email body with it

The trouble is, I am unsure how to parse data below to suit my needs / what kind of approach to use for that. My guess would be to first read date from the 3rd line, so we know for what day statistics apply. Secondly, I would go with matching text i.e. "Messages received - Total:" and match it with Excel row. Table would be designed:

- 1st column Messages received total, messages received - last 24 hours, etc...
- 2nd column would be "Date", 2nd row of column 2 would be the numbers according to below..

That's how much I figured that it should be. Any more pointers / examples would be highly appreciated.


The body of email appears like this:

///	 Kiwi Syslog Server Statistics		 ///
---------------------------------------------------
24 hour period ending on: Mon, 25 Mar 2013 00:00:02 Syslog Server started on: Thu, 07 Mar 2013 07:48:35
Syslog Server uptime:	 17 days, 16 hours, 10 minutes
---------------------------------------------------
+ Messages received - Total:		 5199162
+ Messages received - Last 24 hours: 246856 Messages received - Since
+ Midnight: 244632
+ Messages received - Last hour:	 10015
+ Message queue overflow - Last hour: 0
+ Messages received - This hour:	 1900
+ Message queue overflow - This hour: 0
+ Messages per hour - Average:	 10207
+ Messages forwarded:				 0
+ Messages logged to disk:		 244760
+ Errors - Logging to disk:		 0
+ Errors - Invalid priority tag:	 0
+ Errors - No priority tag:		 0
+ Errors - Oversize message:		 91096
+ Disk space remaining on drive E: 31727 MB
---------------------------------------------------

	 Breakdown of Syslog messages by sending host
+--------------------------+------------+------------+
| Top 20 Hosts			 | Messages | Percentage |
+--------------------------+------------+------------+
| server1.domain.local|	 79238 |	 32,39% |
| server2.domain.local|	 60212 |	 24,61% |
| server3.domain.local|	 18084 |	 7,39% |
| server4.domain.local|	 17341 |	 7,09% |
| 10.10.10.1			 |	 12223 |	 5,00% |
| 10.10.10.2			 |	 11869 |	 4,85% |
| server5.domain.local|	 8093 |	 3,31% |
| server6.domain.local|	 4945 |	 2,02% |
| server7.domain.local|	 4001 |	 1,64% |
| server8.domain.local|	 3952 |	 1,62% |
| server9.domain.local|	 3872 |	 1,58% |
| server10.domain.local|	 3520 |	 1,44% |
| server11.domain.local|	 3413 |	 1,40% |
| server12.domain.local|	 2936 |	 1,20% |
| server13.domain.local|	 2908 |	 1,19% |
| server14.domain.local|	 2737 |	 1,12% |
| server15.domain.local|	 1777 |	 0,73% |
| server16.domain.local|	 1164 |	 0,48% |
| server17.domain.local|	 1085 |	 0,44% |
| server18.domain.local|	 1007 |	 0,41% |
| All others (4)		 |	 255 |	 0,10% |
+--------------------------+------------+------------+

Breakdown of Syslog messages by severity
+--------------------+------------+------------+
| Message Level	 | Messages | Percentage |
+--------------------+------------+------------+
| 0 - Emerg		 |		 0 |	 0,00% |
| 1 - Alert		 |		 0 |	 0,00% |
| 2 - Critical	 |	 208 |	 0,09% |
| 3 - Error		 |	 198 |	 0,08% |
| 4 - Warning	 |	 697 |	 0,28% |
| 5 - Notice		 | 216086 |	 88,33% |
| 6 - Info		 |	 27443 |	 11,22% |
| 7 - Debug		 |		 0 |	 0,00% |
+--------------------+------------+------------+


Problem with sending Mouse movements and keys to a minimized window

$
0
0
Hello guys,

I’m new at this forum and my English isn’t the best, also pleas understand if is something not so good written or if you don't understanding some answers.

Ok my problem is that I would like to send mouse movements, clicks and keys with AutoIt to a minimized window.
But I haven't a handle or something like this, only the title.
The window seems like it is a big image ...

Are there some functions for a workaround.
I hope your can help me.

Feirell

Issue with Regaining Window GUI access

$
0
0
Hi,

I am running an XmlRpc client/server program, in which the Client side python code triggers the Autoit script("kumar.exe") which is to perform an application installation.

Autoit script is in server side and it is triggered from client machine.

here when the autoit script gets triggered , the installation setup window loses it's control and hence the installation is not proceeding.

Can anyone help in solving this problem ??


Client side python code:
-----------------------------------------------------------------------------------------------------------------

import xmlrpclib
import sys

proxy = xmlrpclib.ServerProxy('http://'+sys.argv[1]+':8001')

#print ("AutoIT script trigger output %s" % str(proxy.ads_trigger("c:\Sharing\kumar.exe")))
get_line =  proxy.ads_trigger("c:\Sharing\kumar.exe")
out_file = open(r"c:\builds\ads-log248.txt", "w")
out_file.write("%s" %(get_line))
out_file.close(
---------------------------------------------------------------------------------------------------------------



AutoIT Script code:
---------------------------

#include <Process.au3>
#Include <GuiToolBar.au3>
#include <GUIConstantsEx.au3>

ADS_Install()
Exit


Func ADS_Install()
  RunAsWait("Administrator", "", "Emc@123", 0, "C:\Sharing\abcd.exe")
  WinWaitActive($val, "Welcome to the Avamar Downloader")
  Send("{ENTER}")
  WinWaitActive($val, "Install Avamar Downloader")
  Send("{ENTER}")
  WinWaitActive($val, "&Install")
  Send("{ENTER}")
  WinWaitActive($val, "&Finish")
  Send("{ENTER}")
EndFunc

simple screen locker multiple screens?

$
0
0
Best autoiters,

i have a code which will lock your screen and in order to continue you must fill in a password or press pause button which i will delete when finished.
just when i do it my second screen will still be visuable which is not good so i would like to ask if someone could help me out?
here is the code so far:
[ autoit ]         
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3>#include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) Global $PASS $PASS = "tCHkvJW8" HotKeySet ("{PAUSE}", "Close") HotKeySet ("{F1}", "Unlock") guimain() Func guimain() $GMain = GUICreate("fullscreencover", @DesktopWidth , @DesktopHeight,0,0,$WS_POPUP) WinSetTrans ($GMain, "text", 255) GUISetState() EndFunc While 1 WEnd Func Close() Exit EndFunc Func Unlock() $EnterPass = InputBox ("Unlock", "Please enter password to unlock screens", "", "#") If $EnterPass = $PASS Then Close() Else MsgBox (0,"Oops... Wrong password?", "I'm sorry friend i think that might be the wrong password...") EndIf EndFunc

Read specific part of a text file:

$
0
0
I need to read a very specific part of a text file and I'm struggling:

My text file lists software (and GUIDs for software) that a particular PC has installed.

A single line of the text file reads like this and typically there may be up to 500 lines per file.


PCNAME   {24531475-94B9-4A91-B4AA-16158C6AE026} SOFTWARE NAME VER.NUM.OF.SW SOFTWARE SUPPLIER DATE

I know the name of the piece of software and I can find that inside the text file no problem, but I need to get the GUID out.

Here's what I've tried....

This didn't work, I tried using _StringBetween and stating the PCName and the Software to return the GUID but it didn't work.

[ autoit ]      
  #Include<File.au3> #Include <String.au3> $Hostname = ("PCNAME") $File = ("C:\Remote Uninstall\PCNAME.txt") $FileData = FileRead($File) $GUID = _StringBetween($FileData,$Hostname,"SOFTWARE NAME") MsgBox(0,"GUID",$GUID)

I also tried


[ autoit ]      
$Hostname = ("PCNAME") $File = ("C:\Remote Uninstall\PCNAME.txt") $FileData = FileRead($File) $Position = StringInStr($FileData,"SOFTWARE NAME") MsgBox(0,"SOFTWARE NAME","String SOFTWARE NAME occurs at position - " & $Position) $StartPos = $Position - 39                     ;take away 39 characters from the position found to move to the start of the GUID FileOpen($File,2) FileSetPos($File,$StartPos,0)                ;set position in the file FileRead($File,38)                                 ;tried reading 38 characters from the start position.



I feel String Regular Expression is probably what I need but I can't see how I'd use it?

Any ideas welcome, I've attached a sample text file.

Process Hide

$
0
0
Can you show me an example of hiding process in taskbar?

I know no one will help like the first time i tryed .

Also I wanna help with hexedit function.

quit script after its done

$
0
0
Hi guys,

Run "C:\Program Files (x86)\Total CMA Pack\totalcmd.exe"
^!F1::
ExitApp


My script runs total commander and sends a hotkey combination. After that i want to stop the script. ExitApp doesnt work without beeing used with a hotkey like escape.

TCPRecv - not receiving whole string ??

$
0
0
Hi AutoIt, I have a tiny little problem : I created a very basic , simple, and working TCP chat client/server for sending text between each other.
The problem is that sometimes, its just doesn't receives the whole sent string by the client. I mean, If I will send "welcome" string, most of the times receives it all BUT sometimes it will receive it as "elcome".

Does anyone knows what could be the problem ? I will mention that the client that sends the text uses a low-speed internet, but after I have added consoleWrite command to see how many digits is sending the TCPSend when sending the "welcome" string, every time shows it was send 7 digis so its correct , even if the server doesn't receives the whole string :|. I really really don't know what to do :{ What could be the problem , should I let it more to receive whole data in the variable ,with a Sleep command ?

Download a file check process when is finished

$
0
0
Hello everybody, I have problem I want make script who is waiting for file when is downloaded after this run a file. I have script like this but is not working, maybe sombody can check what's wrong with script?
[ autoit ]      
Do $t = $t + 1 Until (FileExists("C:\Documents and Settings\Administrator\My Documents\Downloads\jZipSetup.exe") And Not FileExists("C:\Documents and Settings\Administrator\My Documents\Downloads\jZipSetup.exe.part")) Or ($t = 60 And Not FileExists("C:\Documents and Settings\Administrator\My Documents\Downloads\jZipSetup.exe") And Not FileExists("C:\Documents and Settings\Administrator\My Documents\Downloads\jZipSetup.exe.part")) Or (WinExists("Download Error")) Sleep(500) WinClose("Downloads") run( "cmd /c ""C:\Documents and Settings\Administrator\My Documents\Downloads\jZipSetup.exe""", "", @SW_HIDE )

I got error this:
Posted Image

ConnectWise API through AutoIt

$
0
0
Hello everyone. ConnectWise is a program that stores customer data, allows techs to document their time, store inventory information and more. I am very new to HTTP posts, gets, requests, things like that. To keep things simple, I want to use the simplest API: retrieve the ConnectWise version.  Here are the instructions they give:

We provide a means of accessing the API via direct HTTP POST calls. Get requests are also allowed, but are discouraged.

The entry point for plain HTTP is:
http://<psa public sitename>/v4_6_release/services/system_io/integration_io/processclientaction.rails

You will pass the actionString as a form element with a name of "actionString."


Here is the request:

<?xml version="1.0" encoding="utf-16"?>

<GetConnectWiseVersionAction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<IntegrationLoginId>integratorUsername</IntegrationLoginId>

<IntegrationPassword>integratorPassword</IntegrationPassword>

<CompanyName>companyId</CompanyName>

</GetConnectWiseVersionAction>


Can someone provide some example AutoIT code that allows me to receive the version? Thank you very much in advance!

Click + button on internet explorer

_IELoadWait issue

$
0
0
Hi,
I am having problems with the _IELoadWait. It is giving an error at line 585 "WEnd" when waiting for drop-down or the frame on the page to load. It was suggested on another post that it is "synchronization issue" and wll be fixed.
http://www.autoitscript.com/forum/topic/142057-ieloadwait-wend-error/

Is there a fixed version of AutoIT? If not, can somebody give me a little bit more help on how to handle the issue? If instantiate a COM error handler is the only way, can you please send me some lines of code, how would that look like?

Thanks

Pause script till key is pushed?

$
0
0
I saw another topic on this but it got kind of convoluted.  Is there no easy way to tell a script to pause until a key is pressed?  Is there no function like winwaitactive only waitforkey or anything like that?
Viewing all 12506 articles
Browse latest View live


Latest Images