Hi,
Anyone knows how to send TAB Function to an inactive window...can we use controlsend to do this...if so please let me know hoe to do .
TIA
Hi,
Anyone knows how to send TAB Function to an inactive window...can we use controlsend to do this...if so please let me know hoe to do .
TIA
Hi Guys,
I'm new to this and have followed some of the tutorials etc. I am starting to make my first script to automate a installation of a program - Unfortunately there is no silent install.
This is what I have so far however even though it recognises that the window is active it will not simulate pressing enter to proceed to next screen. Even using Send("!n") doesn't work.
AM I missing something?
My platform is Win 7 64bit
#include <MsgBoxConstants.au3> #include <Constants.au3> Run('OridionPCUtilities.exe') Sleep(20000) ; Wait for splash screen to disappear Local $hWnd = WinWait("[TITLE:Setup - Oridion PCUtilities]", "", 20) WinActivate($hWnd) If WinActive("Setup - Oridion PCUtilities") Then ; Check if Notepad is currently active. ;MsgBox($MB_SYSTEMMODAL, "", "WinActive" & @CRLF & "Window is active.") Send("{ENTER}") Else MsgBox($MB_SYSTEMMODAL, "", "WinActive" & @CRLF & "Window is not active.") EndIf
Here is a simmary of the infomation provided by au3info:
>>>> Window <<<<
Title: Setup - Oridion PCUtilities
Class: TWizardForm
Position: 606, 346
Size: 503, 388
Style: 0x16CA0000
ExStyle: 0x00000100
Handle: 0x0000000000100F42>>>> Control <<<<
Class: TNewStaticText
Instance: 2
ClassnameNN: TNewStaticText2
Name:
Advanced (Class): [CLASS:TNewStaticText; INSTANCE:2]
ID: 921522
Text: This will install Oridion PCUtilities 3.31.3.7 on your computer.It is recommended that you close all other applications before continuing.
Click Next to continue, or Cancel to exit Setup.
Position: 176, 71
Size: 301, 239
ControlClick Coords: 121, 165
Style: 0x54000180
ExStyle: 0x00000000
Handle: 0x00000000000E0FB2>>>> Mouse <<<<
Position: 906, 607
Cursor ID: 13
Color: 0xFFFFFF>>>> StatusBar <<<<
>>>> ToolsBar <<<<
>>>> Visible Text <<<<
Welcome to the Oridion PCUtilities Setup WizardThis will install Oridion PCUtilities 3.31.3.7 on your computer.
It is recommended that you close all other applications before continuing.
Click Next to continue, or Cancel to exit Setup.
&Next >
Cancel>>>> Hidden Text <<<<
Please enter the Installation Code, then click Next.SOFTWARE LICENSE AGREEMENT
< &Back
Hi, I write following script:
Using function _IEDocInsertHTML with autoit 3.2 and internet explorer 9 give back the following message:
$_IEStatus_InvalidObjectType, Expected document element.
Looking at IE.au3 you can see a if block:
If Not __IEIsObjType($o_object, "browserdom") Or __IEIsObjType($o_object, "documentcontainer") Or __IEIsObjType($o_object, "document") Then
__IEConsoleWriteError("Error", "_IEDocInsertHTML", "$_IEStatus_InvalidObjectType", "Expected document element")
Return SetError($_IEStatus_InvalidObjectType, 1, 0)
EndIf
If you limit the control to __IEIsObjType($o_object, "browserdom") the function works, so probably something goes wrong with the evaluation. You can easily reproduce the problem with the following code:
#include <IE.au3>
Local $oIE = _IECreate("http://www.autoitscript.com")
Local $oBody = _IETagNameGetCollection($oIE, "body", 0)
_IEDocInsertHTML($oBody, "<h2><font color=red>This HTML is inserted After Begin</font></h2>", "afterbegin") _IEDocInsertHTML($oBody, "<h2><font color=red>This HTML is inserted Before End</font></h2>", "beforeend")
Hope this Helps.
Heros
Hi Guys,
I have a little question want to understand :
suppose a char array -- "char[100]", it is 100 bytes, every element is 1 byte. In the C/C++, if I pass some unicode characters (assume every unicode needs 2 bytes.) in this array, I know per 2 element can represent a unicode character and C/C++ can output them normally.
But in the Autoit, when I call the Dllstruct* function, the code as below:
$a = DllStructCreate("char text[2]") ; this array only 2 bytes DllStructSetData($a, "text", "你"); this character is chinese $b = DllStructGetData($a, 1) MsgBox(4096, "", $b); it can output normally, no problem
this code is working, BUT.........if I change as below:
$a = DllStructCreate("char text[10]"); it has 10 bytes DllStructSetData($a, "text", "你好"); 2 Chinese characters $b = DllStructGetData($a, 1) MsgBox(4096, "", $b); output is "你?"
Why?
Maybe I have little obsessive-compulsive disorder.......
Anyway, thanks in advance for your help.
I am querying a group of computers to see if they use a specific homepage for Internet Explorer. This is located at HKEY_Current_User\Software\Microsoft\Internet Explorer\Main and the registry name I believe for IE is "Start Page." Ideally, if it finds the start page URL that I list in the script, I want it to return an exit code. Not sure of best way to write it though.
Something like...
If StartPage = xxx,
return exit code 1
If StartPage = yyy,
return exit code 2
If StartPage = zzz,
return exit code 3
else
return exit code 0
Along those lines. Any help is appreciated, I'm sort of stuck :/
Hello, Is there a way to get the audio master volume level? Thanks!
PS. I couldn't find such feature even with nircmd.exe.
Hi All:
Using AutoIT (v3.3.10.2) I am trying to automate a test for a handheld device using an emulator named MyMobiler on Windows 7.
The screen shots and relevant steps of my problem could be seen in the link below:
http://howtoreaddynamiccontrolid.blogspot.ca/
Problem description:
Thanks
I'm having difficulty putting together a script that will Read line by line and create a new txt file with aditional material.
Example of input.txt
"C:\Item 0x796D.bmp"
"C:\Item 0x796E.bmp"
Example of output.txt
<item index="0x796D" file="C:\Item 0x796D.bmp" remove="False" />
<item index="0x796E" file="C:\Item 0x796E.bmp" remove="False" />
I want to learn, i'll admit i'm having trouble getting started with this particular script and I have done searches for information on this before posting this and even after i've posted this thread ill continue to be searching the forums for useful information.
Feel free to yell at me else Thank you for your time.
GUICtrlSetState( $cbTrks, $GUI_CHECKED) works. If I only have the string "$cbTrks" how can I get the reference needed? tia.
Hi.
I just installed the latest full editor , and when I tried to compile my script it gace me an "Access is denied." message.
I didn't have it on the regular editor.
Any help will be great!
Thanks!
Hello All,
I need help with selecting items in the save as dialogue box
I surf the net and Autoit forum but none of the solutions seem to work for me
below is the code I have worked with which is basically not doing what i wanted
the file still get saved in the previous selected folder.
I want the file to be saved in what ever folder i indicated in my code.
WinWaitActive("Save As", "&Save", 10) Sleep(1000) If ControlTreeView("Save As", "", 100, "Exist", "Desktop") Then ControlTreeView($windowname, "", 100, "Select", "Desktop|My Folder") ; to save file in My Folder (specific folder of choice) Else MsgBox(0, "not existing", "this is not working"); i am trying to check if the first example works if not try other option WinWaitActive("Save As", "") ControlClick("Save As", "", "[CLASS:Button; INSTANCE:100]") $hTree = ControlGetHandle("Save As", "", "[CLASS:SysTreeView32; INSTANCE:100]") ; get handle to the treeview window ControlTreeView("Save As", "", $hTree, "Expand", "#0|#13") ; expand a node ControlTreeView("Save As", "", $hTree, "Expand", "#0|#13|#10") ; expand a child node of the above node EndIf ControlSend($windowname, "", $control, "file name" & ".pdf") ControlClick($windowname, "&Save", 1, "left", 1)
My file still saves still does not save in the specified folder.
Thanks for the help in advance
txt file example attached
what's the easiest/fastest way of that info to be imported into listview
by some predictions my listview will have maximum of 200 rows.
column separator is "|"
im using melba's UDF GUIListViewEx.au3 for listview controls
i am successfully using _GUIListViewEx_ReadToArray to export listview to that text file
i dont know if function _GUIListViewEx_ReturnArray is used to import values to listview
tried some combination but couldnt get it to work.
can anyone help?
also i think melba helped me with this.
Hi, i wrote this little program
#include <CompInfo.au3> #Region ;~~ Computer Infomartion Local $CompInf Local $CPURam Local $CPUInfo = '' $CPUInfo &= '===>CPU Information' & @CRLF _ComputerGetOSs($CompInf) $CompInf = StringSplit($CompInf[1][0], '|') $CPUInfo &= 'OS: ' & @TAB & @TAB & @TAB & $CompInf[1] & @CRLF _ComputerGetSystem($CompInf) $CPUInfo &= 'System: ' & @TAB & @TAB & $CompInf[1][46] & @CRLF _ComputerGetProcessors($CompInf) $CPUInfo &= 'CPU: ' & @TAB & @TAB & @TAB & $CompInf[1][0] & @CRLF _ComputerGetMemory($CompInf) For $i = 1 To $CompInf[0][0] $CPURam += $CompInf[$i][2] Next $CPUInfo &= 'Ram: ' & @TAB & @TAB & @TAB & Round(Number($CPURam/1024^2)) & ' MB' & @CRLF _ComputerGetVideoCards($CompInf) For $i = 1 To $CompInf[0][0] $CPUInfo &= 'VGA' & $i & ': ' & @TAB & @TAB & @TAB & $CompInf[$i][0] & @CRLF Next _ComputerGetMonitors($CompInf) For $i = 1 To $CompInf[0][0] $CPUInfo &= 'Monitor' & $i & ': ' & @TAB & @TAB & $CompInf[$i][21] & '*' & $CompInf[$i][20] & @CRLF Next #EndRegion MsgBox(0, '', $CPUInfo)
all it does is fetch some information about my computer. It worked well before i formatted my PC. Now when i run the script the icon just appears in the tray and after 5s it disappears, without any messageboxes..
if i remove all functions except _ComputerGetOSs and _ComputerGetMemory, the program will work. Any idea why the others do not work?
Hello all. I downloaded and installed AutoIt 1-2-3 along with SciTE - Editor. When running AutoIt 1-2-3, Step Number 2 , I get the error below:
I downloaded both programs twice in case there was some corruption the first time but it didn't help.
Thoughts?
Regards, Dave
What is the best way to get an array list from a directory structure of music\artists\albums\songs? Maybe a 3d array like:
$arr[artist][album][songs] or maybe separate array for each category. I will later need to display the artists in a form which will list the albums and songs based on the artist selected. A 3d array would allow me to easily list all the song or albums under a specific artist.
CurrentIy, I am using _FileListToArrayRec which puts everything in a 1 dimensional array.
Example() Func Example() $dir = "C:\test" song names are listed under test\artist\album\songname ; A list of all mp3 songs with full path Local $aArray = _FileListToArrayRec($dir, "*.mp3||*.*", 13, 1, 1, 1) ConsoleWrite("Error: " & @error & " - " & " Extended: " & @extended & @CRLF) _ArrayDisplay($aArray, "Sorted tree") EndFunc
Hello,
I have a question regarding a sentence in the documentation of ObjEvent function.
ObjEvent ( "AutoIt.Error" [, "function"] )
....If the second parameter is omitted, it will return the name of the current Error handler function or function, depending what was used when registering.
Is there a typo? Or what is meant by " ... or function"?
/Indi2Go
Hi all i'm trying to write a key in the the regestry but it always return @error 1. This is the code:
The folder My-program doesn't exist maybe this is the problem?
thanx.