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

process status

$
0
0


             Is there a way to write a script that will return if
             a process is running or paused?

Can anybody help me please? What's wrong with this?

$
0
0
[ autoit ]      
;_ReadSettings() - Reads all of the settings from the configuration file. If a value doesn't exist, the bot will ask for the value, save it, then proceed. Func _ReadSettings() $GameFolder = IniRead($SettingsFile, "GamePath", "Path", "") If Not FileExists($GameFolder & "\APBGame\Config\APBEngine.ini") Then Do $GameFolder = FileSelectFolder("Find the APB Reloaded install folder", "", 0, @program FilesDir) Until FileExists($GameFolder & "\APBGame\Config\APBEngine.ini") IniWrite($SettingsFile, "GamePath", "Path", $GameFolder) EndIf ;If the game's configuration file is not found, then your path name is incorrect. The bot will proceed to ask for the proper path until the proper path is given and then write the proper path into the configuration file.

I get FilesDir error:
Line 247
FilesDir)
FilesDir^ ERROR

Error: Missing separator character after keyword.

WinClose to close all open windows

$
0
0
I have spent the past couple of days searching for the answer to this question, and I have not found one that really works.

What I am trying to do, is have the following code always run and when ever notepad is open and idle for more then 2 seconds close it. It works but only when their is one instance of Notepad, if there are more then one it does not close all of them at the same time.

Can someone help me, using this code, to have all windows with the title Notepad close?

[ autoit ]         
#include <Timers.au3> ;Declare the Timer: ; Global $TIMER = TimerInit() Opt("TrayOnEventMode",1) Opt("TrayMenuMode",1) HotKeySet("#{F4}", "_exit") ; Ctrl-Shift-Alt-X to exit While 1     ;If this application is active then reset the timer:     If WinExists("Notepad") And _Timer_GetIdleTime() >= 2 * 1000 Then      MsgBox (0, "Time reached", "You have been idle for more than 2 seconds.") WinClose("Notepad") EndIf     ;Sleep for 1 seconds before looping again: ;    Sleep(1000) WEnd Func _exit() Exit EndFunc

Thanks

Grimm

Terminate with operator key

$
0
0
Hello again!

I would like to use the follow script, except I would like to add an operator script. eg use ALT-ESC but I dont know how to code this in?

I would also like this script to run two programs and then terminate both with the same key combination, is this easily done?

HotKeySet("{ESC}", "Terminate")
If $CmdLine[0] == 1 Then
ProcessClose ( "XBMC.exe" )
Run ( '"H:\remotedesktop.exe" /e "' & $CmdLine[1] & '"', "H:\" )
While 1
Sleep(100)
WEnd
EndIf
Func Terminate()
ProcessClose ( "remotedesktop.exe" )
Run ( '"H:\Interface\xbmc\XBMC.exe"' )
WinWait ( "XBMC" )
WinActivate ( "XBMC" )
Exit 0
EndFunc


Thanks for your help!

Updated!

Can't change Hotkey from F9 to F11 in au3 - Please Help!

$
0
0
Hi.
Someone provided me with a script to toggle foobar2000 into fullscreen display.
When I got the script it had Ctrl+Alt+Shift+G {^!+g} as the hotkey which I changed to F9.

HotKeySet("{F9}", "ToggleFullscreen")

This worked, but changing from F9 to F11 won't work.
Any help would be very much appreciated.
Below the script and thanks in advance.

[ autoit ]         
#region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=foobar.ico #AutoIt3Wrapper_UseX64=n #AutoIt3Wrapper_Res_Language=1033 #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker #AutoIt3Wrapper_Run_Tidy=y #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** #include #include #include #include ; ============================================================================ ; ; Changing this to True will make the script start foobar200 itself, and exit when it closes. ; Otherwise the script will stay running indefinitely, monitoring for foobar2000 whenever it starts. Global Const $startFoobar2000 = True Global $pidFoobar2000 = 0 Global $wndFoobar2000 = 0 Global $wndSavedPosition Global Const $FullscreenRect[2] = [ _ _WinAPI_GetSystemMetrics($SM_CXSCREEN), _ _WinAPI_GetSystemMetrics($SM_CYSCREEN) _ ] Func ToggleFullscreen() Global $wndFoobar2000, $wndSavedPosition Local Const $stylesToRemove = BitOR($WS_CAPTION, $WS_BORDER, $WS_SIZEBOX) If Not WinExists($wndFoobar2000) Then Return Local $wndStyle = _WinAPI_GetWindowLong($wndFoobar2000, $GWL_STYLE) If @error Then Return If BitAND($wndStyle, $stylesToRemove) <> 0 Then $wndSavedPosition = WinGetPos($wndFoobar2000) $wndStyle = BitAND($wndStyle, BitNOT($stylesToRemove)) _WinAPI_SetWindowLong($wndFoobar2000, $GWL_STYLE, $wndStyle) _WinAPI_SetWindowPos($wndFoobar2000, $HWND_TOPMOST, _ 0, 0, _ 0, 0, _ BitOR($SWP_NOCOPYBITS, $SWP_FRAMECHANGED, $SWP_NOMOVE, $SWP_NOSIZE)) _WinAPI_SetWindowPos($wndFoobar2000, 0, _ 0, 0, _ $FullscreenRect[0], $FullscreenRect[1], _ BitOR($SWP_NOCOPYBITS, $SWP_FRAMECHANGED, $SWP_NOZORDER)) Else $wndStyle = BitOR($wndStyle, $stylesToRemove) _WinAPI_SetWindowLong($wndFoobar2000, $GWL_STYLE, $wndStyle) _WinAPI_SetWindowPos($wndFoobar2000, $HWND_NOTOPMOST, _ 0, 0, _ 0, 0, _ BitOR($SWP_NOCOPYBITS, $SWP_FRAMECHANGED, $SWP_NOMOVE, $SWP_NOSIZE)) If UBound($wndSavedPosition, 1) >= 4 Then _WinAPI_SetWindowPos($wndFoobar2000, 0, _ $wndSavedPosition[0], $wndSavedPosition[1], _ $wndSavedPosition[2], $wndSavedPosition[3], _ BitOR($SWP_NOCOPYBITS, $SWP_FRAMECHANGED, $SWP_NOZORDER)) EndIf EndIf EndFunc ;==>ToggleFullscreen Func GetFoobar2000Window() Local $allWindows = _WinAPI_EnumWindowsTop() If @error Then Return 0 Local $wndAlt = 0 For $i = 1 To $allWindows[0][0] Local $hwnd = $allWindows[$i][0], $pidWindow If _WinAPI_GetWindowThreadProcessId($hwnd, $pidWindow) And $pidWindow == $pidFoobar2000 Then ; This is a hackish way to try and detect foobar2000's main window. ; It should have a maximize button, or at least the corresponding style! If (BitAND(_WinAPI_GetWindowLong($hwnd, $GWL_STYLE), $WS_MAXIMIZEBOX)) Then Return $hwnd ElseIf Not $wndAlt And StringInStr(_WinAPI_GetWindowText($hwnd), "foobar2000") Then $wndAlt = $hwnd EndIf EndIf Next ; No window found with the semi-reliable method. Just return one with 'foobar2000' in the title. Return $wndAlt EndFunc ;==>GetFoobar2000Window If $startFoobar2000 Then $pidFoobar2000 = Run(StringFormat('"%s/%s" %s', @ScriptDir, "foobar2000.exe", _Iif(@Compiled, $CmdLineRaw, ""))) If @error Then MsgBox($MB_ICONHAND, "foobar2000 Full-screen", "Error: failed to start foobar2000.exe. Make sure this script is placed in foobar2000's folder.") Exit 1 EndIf If _Singleton("foobar2000_fullscreen", 1) == 0 Then Exit 1 EndIf ElseIf _Singleton("foobar2000_fullscreen", 1) == 0 Then Exit 1 EndIf HotKeySet("{F9}", "ToggleFullscreen") While True If Not ProcessExists($pidFoobar2000) Then If Not $startFoobar2000 Then $pidFoobar2000 = ProcessWait("foobar2000.exe") Else Exit EndIf EndIf If Not WinExists($wndFoobar2000) Then $wndFoobar2000 = GetFoobar2000Window() If Not $wndFoobar2000 Then Sleep(1000) ContinueLoop EndIf EndIf Sleep(200) WEnd

Image Search Problems

$
0
0
Hello,

I recently followed the following Image Search tutorial;

I followed it to the letter, using the iTunes logo on my desktop as the picture. But, after finishing and pressing the hotkey, the macro does nothing. I have the ImageSearch.au3 in the folder as well as the DLL and picture of the icon. Here is my code;

[ autoit ]      
#include HotKeySet("{F4}", "Start") $X = 0 $Y = 0 Func Start() $Search = _ImageSearch('Rare.bmp',0,$X,$Y,0) If $Search = 1 Then MouseMove($X, $Y, 10) EndIf EndFunc while 1 sleep(100) WEnd

Any help as to why this is not working would be greatly appreciated. I have tried turning the transparency up, but had no luck. Thanks!

[..] List hidden files (like gmer or IceSword does)

$
0
0
Hi every body!
I have a question:
- Is it possible with AutoIt to list rootkit hidden files/registry keys/processes? I mean, like does anti-rootkit utilities like gmer or IceSword
- If it's not possible using AutoIt, do you know any command line tool, or external ibrary that would help me doing that.

Thanks!

Error using _WordDocReplace.......

$
0
0
I am having some trouble understanding where my formatting is wrong in this code, specifically with the _WordDocFindReplace parameters:


;Open the letter template and fill out the form
Local $myTemplate = @ScriptDir & "\templates\ Letter.doc"

Local $oWordApp  = _WordCreate("", 0, 0)
Local $oDoc = _WordDocOpen($oWordApp, $myTemplate)

Local $oFind = _WordDocFindReplace($oDoc, "[TN]", $EspStatTN)
Local $oFind = _WordDocFindReplace($oDoc, "[USERNAME]", $EspStatUsername)
Local $oFind = _WordDocFindReplace($oDoc, "[PASSWORD]", $EspStatPassword)
Local $oFind = _WordDocFindReplace($oDoc, "[EMAILADDRESS]", $EspStatUsername)
Local $oFind = _WordDocFindReplace($oDoc, "[IPBLOCK]", $EspStatIPBlock)
Local $oFind = _WordDocFindReplace($oDoc, "[NETMASK]", $EspStatNetmask)
Local $oFind = _WordDocFindReplace($oDoc, "[NETMASK]", $EspStatNetmask)


_WordDocSaveAs($oDoc, @ScriptDir & "\Test.doc")
_WordQuit($oWordApp)


At runtime the error is actually occurring within the Word.au3 UDF.  I'm not sure why it's saying there is an error in the expression, because I followed the example code here:

http://www.autoitscript.com/autoit3/docs/libfunctions/_WordDocFindReplace.htm

The error returned is:

 

C:\Program Files\AutoIt3\Include\Word.au3 (749) : ==> Error in expression.:
$return = .Execute($s_FindText, $f_MatchCase, $f_MatchWholeWord, $f_MatchWildcards, $f_MatchSoundsLike, $f_MatchAllWordForms, $f_Forward, $i_Wrap, $f_Format, $s_ReplaceWith, $i_Replace)
$return = .Execute($s_FindText, $f_MatchCase, $f_MatchWholeWord, $f_MatchWildcards, $f_MatchSoundsLike, $f_MatchAllWordForms, $f_Forward, $i_Wrap, $f_Format, $s_ReplaceWith, $i_Replace)^ ERROR

Any assistance narrowing down where my error is here is greatly appreciated.   Basically, I'm opening an existing document, executing a Find/Replace function to fill out a form, and then saving the resulting file back out.

-hogfan

Find Text from ReadFile

$
0
0
Hi, everybody. I am new to this so bear with me. As part of my sysadmin responsibilities, I monitor several logs. I decided to try my hand at making a script that would combine them into one window for viewing and be able to use some tools within the same interface. So far, I am trying this with just one log. I want to be able to read the log, search within the log for certain strings of text, and be able to launch a network tool called Fing. I have all of this working except for the find function. I open the file, then read the file within a text box that is generated by Koda form generator. I want to be able to search within the text of that file. Any help is appreciated. I will post the code below.

Edit** Forgot to paste the #include portion.


[ autoit ]         
#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiEdit.au3> Local $file = FileOpen("z:\logs\server.log", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf $text = FileRead($file) #Region ### START Koda GUI section ### Form=c:\program files\autoit3\scripts\form.kxf $Form1_1 = GUICreate("Server Log", 615, 438, 192, 124) $Fing = GUICtrlCreateButton("Fing", 440, 24, 113, 57, $BS_ICON) $Find = GUICtrlCreateButton("Find", 440, 112, 113,57) $hEdit= GUICtrlCreateEdit($text, 64, 24, 505, 233, _ BitOR($ES_AUTOVSCROLL, $WS_VSCROLL, $ES_MULTILINE, $WS_HSCROLL, $ES_NOHIDESEL)) GUICtrlSetImage(-1, "C:\Users\User1\Downloads\overlook-fing-2.1.exe", -1) $Edit1 = GUICtrlCreateEdit("", 32, 0, 393, 417) GUICtrlSetData(-1, $text) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### MouseMove (232, 156) MouseClick ("left", 232, 156) Send ("{CTRLDOWN}" & "{END}") sleep (15) Send ("{CTRLUP}") While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $GUI_EVENT_CLOSE ExitLoop Case $nMsg=$Fing Run(@ComSpec & " /c " & "C:\fing.lnk") Case $nMsg=$Find _GUICtrlEdit_Find($hEdit) EndSelect WEnd FileClose($file)

Math help calculate percentage

$
0
0
Hello,

As the tittle says i need some math help to calculate percentage.
This is my script
[ autoit ]      
#include <GUIConstantsEx.au3> $s = 58985480 $ts = Round($s / 1000) $ds = 57603 $i = 0 Do     $sec = @SEC     $bs = 1500     While @SEC = $sec     WEnd     $cs = $ds  $ts = Round($ts - (($cs - $bs) /100))  $ps = Round($ts / $s * 100000)     ConsoleWrite($ts & @CRLF & $ps &"%" & @CRLF) Until $i = 100
$ps is the percentage. What the script does is: It has a specific number and every sec that number gets lowered.
I have managed getting it percentage and count it but my problem is that is the wrong way.
It has to rise from 0% to 100%. Now it is the oposite. It is 100% and as the number gets lowered it gets too.

Any kind of help appretiated

[Solved] RegEx Pattern Algorithm Assist.

$
0
0
I need a bit of help parsing few large excel files about 8mb each file filled with these variation.
I want to capture what in bold only.  These are all narrow down variation.  Most of the time wording are misspelled or abbreviated.

^(?:.*?)(\d+|\$\d+|\d+.\d+|\$\d+.\d+|\$\s\d+.\d+|\d+)


invoice 928.00 paid 880.00 pricing.
Invoice $ 35.20 Paid $ 31.12  Paid invoice per system pricing
inv 1681.00 pd 1575.00 no pay
Invoice $80.00 Paid $79.50 paid per g
(2012-10-08:61516 ) Invoice $ 218.50 Paid $ 164.30 Paid invoice per system pricing
inv 220.89 pd 212.10 paid per pricing less.
Invoiced Amt $76, Paid $64.48 - paid as per flat fee
Invice64.00 Paid 63.50 Paid per admin pricing
Invoiced: $32.00 Paid: $30.00
Inv. $136 Pd. $126 per flat rate of $50 for

Can anyone guide me down or point me to the right direction?  I am willing to learn.
(Sorry didn't mean to hijack other thread.)

Find a variable string in a text file, modify it and replace it.

$
0
0
Hi,

I'm working on a script to merge txt files on a csv file.
My csv file is generated with autoit like this :

FIRSTNAME Lastname;BAT. T;225;XXX 034 458;50XXXXX;Dell Optiplex 790...
FIRSTNAME Lastname;BAT. T;225;XXX 034 458;50XXXXX;Dell Optiplex 790...
FIRSTNAME Lastname;BAT. T;225;XXX 034 458;50XXXXX;Dell Optiplex 790...
FIRSTNAME Lastname;BAT. T;225;XXX 034 458;50XXXXX;Dell Optiplex 790...
etc...

Each line data is different but the general formatting is the same (Name;Localisation;Room;Computer;Serial;Model)

The computer name is always like this : ABC 012 345

Is there a way to remove spaces in each computer name of the file ? From ABC 012 345 to ABC012345 ?
Each computer name always start with GRE. Maybe by searching string like ";GRE ".
But I don't know how to do.

Thanks for your help.
Regards.

[Excel] Can't close Excel when Screensaver is active...

$
0
0
Hi there!

This is a script to open an Excel document of the user's choice, and automatic refresh it every x minutes.
The refreshing is: Close the readonly Excel document, and directly reopen it. (A loop of course)

Just one little problem:
When the screensaver becomes active, it won't close excel anymore, but just opens another instance of the file. Resulting that when I end the screensaver, there are more then 10 instances of Excel active.

Can anyone help me with this annoying problem?

[ autoit ]         
Opt("WinTitleMatchMode", 2) Local $selectXLS = "Selecteer het gewenste Excel bestand." Local $openXLS = FileOpenDialog($selectXLS, @ScriptDir & "\", "Excel bestanden (*.xls;*.xlsx)", 1) If @error Then MsgBox(4096, "", "Geen bestand gekozen.") Exit Else $FileName = $openXLS EndIf if not FileExists($FileName) then Msgbox (0,"Bestandsfout","Ik kan het bestand niet vinden. "& $FileName) Exit Else Local $xLoop = 1 Local $tijdSec = InputBox("Tijdschema Opgeven", "Geef de verversingstijd van bestand in minuten: (bijv: 20)") If @error = 1 Then MsgBox(4096, "Sluiten", "Programma afgebroken.") Exit Else ; OK geklikt, nu openen bestand en verversingsloop in. If $tijdSec < 1 Then MsgBox(4096, "Sluiten", "De minimale verversingstijd is 1 minuut.") Exit Else While $xLoop = 1 ShellExecute("excel.exe", '/r "' & $FileName & '"', @ScriptDir, "", @SW_MAXIMIZE) Sleep($tijdSec*1000*60) if ProcessExists("excel.exe") Then WinWaitActive("Microsoft Excel") WinClose("[ACTIVE]", "") Else Exit EndIf WEnd EndIf EndIf EndIf

compare x amount of 1D arrays

$
0
0
hello world!

i am trying to compare multiple 1d arrays (array amount will always vary) to a master array.

[ autoit ]         
Global $master_array[4] = ["3", "red", "yellow", "green"] Global $compare_array1[8] = ["7", "red", "purple", "magenta", "orange", "blue", "yellow", "darkorange"] Global $compare_array2[10] = ["9", "purple", "brickred", "red", "white", "green", "lightblue", "blue", "black", "gray"] Global $compare_array3[7] = ["6", "turquoise", "brown", "magenta", "mustard", "blue", "red"] Global $compare_array4[9] = ["8", "indigo", "lavender", "purple", "red", "gray", "green", "blue", "cyan"] [b]similarities (all arrays have it)[/b] RED - $master_array, $array1, $array2, $array3, $array4 [b]differences (not found in master array and more than one array has it)[/b] PURPLE - $array1, $array2, $array4 BLUE - $array1, $array2, $array3, $array4 etc.. [b]differences (not found in master array and only 1 array has it)[/b] MAGENTA - $array1 ORANGE - $array1 DARKORANGE - $array1 BRICKRED - $array2 WHITE - $array2 etc...

this is a pretty complex comparison not sure where to start - especially when comparing any number of arrays

thanks in advance!

need help for Checkbox+Dlink

$
0
0
Hi,

I am quite new to AutoIT, after playing around with it so far, I found out what I wanted through help files and tutorials. However this time I can't figure how to make my script work.
I wanna click on checkbox ''Enable Wireless''

part of the HTML code

<input id="w_enable" type="checkbox" checked="" onclick="disable_wireless();" value="1" name="w_enable" default="false">

My Autoit Script

#include <IE.au3>

$oIE = _IECreate("http://192.168.0.1")
$password = _IEGetObjByName($oIE, "log_pass")
_IEPropertySet($password, 'innerText',"")
$button = _IEGetObjById ($oIE, "login")
_IEAction ($button, "click")

$oWireless=_IENavigate($oIE,"http://192.168.0.1/wireless.asp")
$oForm = _IEFormGetObjByName($oWireless, "w_enable")
$oForm.checked = true

It says $oForm isn't an object.

Anyone can figure this out? Or point me some tips, I've also tried using .fire event and _IEFormElementCheckBoxSelect($oForm, "w_enable","", 1, "byValue")  but none of the script I wrote worked.

Running app when screen is unlocked

$
0
0
Good Morning,

I copied a script from here Link and was able to get it so that when the screen is unlocked it displays a message, however what I would like to have happen is only the display a message once, but keep the script running at all times, and then every time the workstation is unlocked display a message.

Here is what I have so far.

[ autoit ]         
Global Const $DESKTOP_SWITCHDESKTOP = 0x100 While 1 If _CheckLocked() = 0 Then msgbox(0, "", "Test") EndIf WEnd Func _CheckLocked() $hLockedDLL = DllOpen("user32.dll") $hDesktop = DllCall($hLockedDLL, "int", "OpenDesktop", "str", "Default", "int", 0, "int", 0, "int", $DESKTOP_SWITCHDESKTOP) $ret = DllCall($hLockedDLL, "int", "SwitchDesktop", "int", $hDesktop[0]) DllCall($hLockedDLL, "int", "CloseDesktop", "int", $hDesktop[0]) If $ret[0] = 0 Then $iLocked = 1 ElseIf $ret[0] = 1 Then $iLocked = 0 EndIf DllClose($hLockedDLL) If $iLocked Then Return 1 Else Return 0 EndIf EndFunc

Thanks,

Grimm

$oTypelib=objcreateinterface($tp, $IID_TYPELIB, $tagITypeLib)

$
0
0
Wondering if by using the new beta AutoIt if by using
$oTypelib=objcreateinterface($tp, $IID_TYPELIB, $tagITypeLib)
you can analyse the typelib of a file

I tried below but (again) missing the point


;~ IID´s
$IID_TYPEINFO="{00020401-0000-0000-C000-000000000046}"
$IID_TYPELIB="{00020402-0000-0000-C000-000000000046}"

;~ Methods of interface ITypelib
$tagITypeLib = "GetTypeInfoCount long();" & _
"GetTypeInfo long(uint;ptr);" & _
"GetTypeInfoType long(uint;ptr);" & _
"GetTypeInfoOfGuid long(ptr;ptr);" & _
"GetLibAttr long(ptr);" & _
"GetTypeComp long(ptr);" & _
"GetDocumentation long(int;ptr;ptr;ptr;ptr);" & _
"IsName long(ptr;ulong;ptr);" & _
"FindName long(ptr;ulong;ptr;ptr;ptr);" & _
"ReleaseTLibAttr long(ptr);"

;~ The file where the type library has to be analysed
$szFile="C:\Windows\System32\UIAutomationCore.dll"
;~ $szFile = FileOpenDialog("Open Type Library", "", "TypeLib Files (*.tlb;*.olb;*.dll;*.ocx;*.exe)|All Files (*.*)", 1)

Local $oleAutDll = DllOpen("oleaut32.dll")

;~ Just load the typelibrary
;~ try 1
$tp = DllStructCreate("ptr")
$result=DllCall($oleAutDll, "ulong", "LoadTypeLib", "wstr", $szFile, "ptr", DllStructGetPtr($tp, 1))

;~ try 2
;~ $tp = ""
;~ $result=DllCall($oleAutDll, "ulong", "LoadTypeLib", "wstr", $szFile, "ptr", $tp)

consolewrite("LoadTypeLib result: "& $result & " error: " & @Error & @crlf)

;~ Try to get the object interface
$oTypelib=objcreateinterface($tp, $IID_TYPELIB, $tagITypeLib)

if isobj($oTypelib) Then
consolewrite("We have the typelib object")
EndIf



I know there are alternatives for analysing typelib but just wondering if this could work with objcreateinterface

http://www.autoitscript.com/forum/topic/114498-typelibinspector-oleview-was-yesterday
http://www.autoitscript.com/forum/topic/112992-tliau3-type-information-on-com-objects-tlbinf-emulation
http://www.autoitscript.com/forum/topic/54227-com-object-browser

Moving on from one If to another if rule is true..?

$
0
0
Hi all,

First of all- im a total beginner at this and have been using many tutorials to weave my way through learning this so be kind :)

I've been working on a script to streamline my teams daily checks which launch in web browsers. My idea is to give my team the option to choose which browser the checks launch in then it will load each of the checks in that specific browser. Because chrome in particular doesn't give me any independent information on specific areas in the browser my script relies on mouse click functions so I added a little checker for ensuring the screen resolution the script launches in is correct.
My problem is if the resolution is complete I would like the script to move on to the next msgbox with the choice of browser options but I'm stuck on how to direct the script on to this line... Any ideas?? :geek:  Cheers!


[ autoit ]         
;Firstly launches message box requesting if you actually want to launch the daily checks. #include $var = MsgBox(4, "Daily Checks Launch", "Do you want to launch Daily Checks?") WinWait("", "", 120) ;If No will exit If $var = 7 Then Exit ;Check whether screen resolution is correct for browser to launch $var_5 = @DesktopHeight $var_6 = @DesktopWidth $var_7 = @DesktopDepth $var_8 = @DesktopRefresh   ;THIS IS THE LINE I'M STUCK ON! If $var_5 = 768 And $var_6 = 1366 And $var_7 = 32 And $var_8 = 60 Then ElseIf $var_5 = Not 768 Or $var_6 = Not 1366 Or $var_7 = 32 Or $var_8 = Not 60 Then $var_9 = MsgBox(16, "Display resolution parser", "You're screen resolution isn't correct for this script. This must be 1366 x 768 60hz Please modify and restart script") If $var_9 = 1 Then Exit EndIf ;Will ask which browser If $var = 6 Then _MsgBox_SetButtonText(6, "Firefox", "IExplorer", "Chrome") $var_1 = _MsgBox(6, "Which Browser?", "Please select your preferred browser?") EndIf If $var_1 = 2 Then Run("C:\Program Files\Mozilla Firefox\firefox.exe") WinWaitActive("[CLASS:MozillaWindowClass]") WinWait("", "", 60)

File name monitor

$
0
0
Greeting,

A program was built to read a configuration file in "m:\application.ini".

Now we are only having drive C: and D:

How can we redirect: read (write) file "m:\application.ini". to become read (write) file "C:\application.ini".

Access other files do not touch it. I think it need stay in Memory

Thanks
usera

need help

$
0
0
Global $hCmdWnd, $aCmdPoss   
$hCmdWnd = WinGetHandle("[CLASS:Command Prompt]")
If Not WinActive($hCmdWnd) Then WinActivate($hCmdWnd);

$aCmdPos = WinGetPos($hCmdWnd)  
MouseClick("right", $aCmdPos[0] + 15, $aCmdPos[1] + 40, 1, 0);
Send("{DOWN 4}{ENTER 2}")   

I took above script from somebody's post.In the mouse click can any body tell me how they calculate the x,y position?
Viewing all 12506 articles
Browse latest View live




Latest Images