
logcomptechs
Active Members-
Posts
52 -
Joined
-
Last visited
Everything posted by logcomptechs
-
WinExist and WinClose?
logcomptechs replied to logcomptechs's topic in AutoIt General Help and Support
Thank you, giving those suggestions a try, to see how they work -
WinExist and WinClose?
logcomptechs replied to logcomptechs's topic in AutoIt General Help and Support
#include <Array.au3> $testarray = WinList("window") For $i = 1 To 28 $windowThatShouldBeThere = "window" & $i If _ArraySearch($testarray, $windowThatShouldBeThere) == -1 Then Call("function") EndIf Next Just simplified it, would that be correct? All I want it to do is if window1 or window23, etc... is missing, then call the function. -
WinExist and WinClose?
logcomptechs replied to logcomptechs's topic in AutoIt General Help and Support
Still kinda confused, cause I need to check 1 through 28, lets say window1 is missing, I need to know what number is missing, in order to call my function properly. I understand that this list all available windows, then run through the array 28 times, to see if any numbers are missing? -
WinExist and WinClose?
logcomptechs replied to logcomptechs's topic in AutoIt General Help and Support
I see, so this would be the same thing then? $aWinList = WinList("AutoIt") If Not $aWinList[0][0] Then MsgBox(16, "Error", "No matching windows found.") EndIf -
WinExist and WinClose?
logcomptechs replied to logcomptechs's topic in AutoIt General Help and Support
Would I do this to check if the window does not exist then? For $n = 1 to $aWinList[0][0] If WinExist($aWinList) = 0 Then Call("function") EndIf Next -
Have two questions involving WinExist and WinClose. First I am trying to see if 28 windows exist, they all have the same name and only the number changes after the name (example: window1, window2, etc...). So far what I have is, when I launch the program, it seems to detect if (example: window14) does not exist, then it calls the function. But after it is done checking all 28 windows exist, then it checks to see if any windows disappeared, it does not detect missing windows again, or at least not all the time. This is the code I am using as of now, maybe it can be improved or there is a better way? While 1 $count = 1 Sleep(100) Do If WinExist("window" & $count) = 0 Then Call("function") EndIf $count = $count + 1 Until $count = 28 WEnd Second question, trying to close all windows with a certain name, but I do not know how many windows are present at any given time. So right now just have it count 28 times (cause that is the max number of times this window could be open). Does not to work very well ether, cause, leave the program running, come back to it, windows with that name will still be there, so wondering if there is a better way? While 1 $close = 1 Sleep(100) Do WinClose("thewindow", "") Sleep(100) $close = $close +1 Until $close = 28 WEnd
-
WinMinimizeAll ( ) Question?
logcomptechs replied to logcomptechs's topic in AutoIt General Help and Support
Thank you, I did see that, but I just thought it would do the same thing, guess not -
Do Sleep(60000) WinMinimizeAll ( ) $sleep = $sleep + 1 Until $sleep = 60 Trying to keep all windows minimized at all times, but when I run this loop, it will minimize all the windows, but once the command runs again it un-minimizes one of the windows. Any way to keep all windows minimized at all times?
-
Well it is a <div> container (then they use AJAX to pop it up), so would that be considered a pop-up or part of the IE main window?
-
Tried that as well. I am thinking it is because the input button is in a AJAX pop up window.
-
Already tried that example, if I set the TagName to "button", it does not find any "type=button" only finds "type=submit".
-
Already gave the button name <input type="button" name="test" value="Send"> and this is just a general question, trying to apply to any website, that uses type=button instead of type=submit.
-
Trying to click on <input type="button" name="test" value="Send"> using the _IE functions but it is not wrapped in <form> (so I do not have a form name) tags and the button is not even a submit button. Any ideas?
-
I did that, but it does not do anything, any thoughts?
-
Did not think so, been looking couldn't find anything even close to that. Any other suggestions?
-
Thanks for all the suggestions guys! Where is this found in the Help File?
-
To recreate a error, for testing purposes, but I am not sure how to make it crash every time. Was thinking about filling up the memory with random numbers or something, but I do know.
-
Wondering if anyone had any ideas on how to overload a .exe and crash it. I do not want to use ProcessClose and I was looking into _WinAPI_WriteProcessMemory but not sure how to use it. If anyone else has any ideas that would be awesome. Thanks!
-
I made a script to remove duplicates from a text file and then it puts all original lines into a new text file. #Include <File.au3> #include <Array.au3> Dim $oFile,$nFile _FileReadToArray("old_text.txt",$oFile) $nFile = _ArrayUnique($oFile) _FileWriteFromArray("new_text.txt",$nFile) You could just run this after you collected all the numbers.
-
If you read the help file, and look at the example, it shows how to cycle through all the images. This just a example, but you could write those Image URLs to a text file, then count the lines in the text file to get number of images. #include <IE.au3> $oIE = _IECreate ("http://www.autoitscript.com/") $oImgs = _IEImgGetCollection ($oIE) $iNumImg = @extended MsgBox(0, "Img Info", "There are " & $iNumImg & " images on the page") For $oImg In $oImgs MsgBox(0, "Img Info", "src=" & $oImg.src) Next
-
You can display as much info as you want. Example $orevar = 1 $othervar = 1 ToolTip("Ore: " & $orevar & @CRLF & "Other Var: " & $othervar, 0 , 0, "") That is just a example, but as you can see, this allow you display as many Variables, as you wanted, on different lines. This would be 10x easier than building a GUI for everything you wanna display, I use tooltips all the time, it works great.
-
Find Duplicate Lines in a Text File?
logcomptechs replied to logcomptechs's topic in AutoIt General Help and Support
Thank You, that was extremely easy! #Include <File.au3> #include <Array.au3> Dim $oFile,$nFile _FileReadToArray("old_text.txt",$oFile) $nFile = _ArrayUnique($oFile) _FileWriteFromArray("new_text.txt",$nFile) -
Find Duplicate Lines in a Text File?
logcomptechs replied to logcomptechs's topic in AutoIt General Help and Support
No need to keep a order or anything like that. Just need something to find duplicated lines and delete. I am going to try _ArraySearch but not 100% sure how to still search for duplicates. -
Is their a way to read a text file by line and delete any duplicate lines? I was looking at _FileReadtoArray, but wasn't sure on how I would go about comparing, because I do not want to delete the original line, just duplicates of that line. Any help would be much appreciated, thanks!