
automagician
Active Members-
Posts
39 -
Joined
-
Last visited
Everything posted by automagician
-
Yes, I thought something was strange with that too... Alan, you should upgrade to v3, the syntax is slightly different, but the code that I gave you will work in v3.....sorry for the mixup.
-
$i = 1 Do ; All your other code Send("{DOWN " & $x & "}") ; All your other code $i = $i + 1 Until $i = 800
-
Do you mean the first time through press down once, the second time press down twice, etc? If that is the case, just put that one Send("{DOWN}") in a loop that loops $n times, and just keep incrementing $n. Is that what you meant?
-
Just as an FYI, I've scene it in the SciTE Editor with the autocomplete....
-
Can you tab through the app? I know it's a pain, but it may be your only choice. Unless any of the higher more experienced powers have any better ideas....?
-
Can you see the objects in the window spy? If so, you could use the control functions.
-
I am assuming that this: means it can be in a .csv file, if that is the case, i wrote a function awhile ago that pulls data from the .csv file here it is: ;------------------------------------------------------- ;Function Name: table_cell_val() ;Purpose: This function goes into the table and retrieves ; the data from the cell. Which cell it looks in ; is determined by the parameters passed. ;Parameters: $table - The data table to use ; $colName - The name of the column that the ; cell is located in. ; $row - Which row to use. *NOTE = row 1 is ; the column name row. ;------------------------------------------------------- Func table_cell_val($table, $colName, $row) $colNum = 1 $handle_a = FileOpen($table, 0) ; Check if file opened for reading OK If $handle_a = -1 Then MsgBox(0, "Error", "Unable to open table.") Exit EndIf $string = FileReadLine($table, 1) $array = StringSplit($string, ","); Splits up the location string $totCol = $array[0] While $colNum <= $totCol If ($colName == $array[$colNum]) Then ExitLoop Else $colNum = $colNum + 1 EndIf Wend $totRow = _FileCountLines($table) $string = FileReadLine($table, $row) $array = StringSplit($string, ","); Splits up the location string $ret = $array[$colNum] FileClose($handle_a) Return $ret EndFunc Hope that helps...
-
filereadline sections into seperate variables
automagician replied to rich2323's topic in AutoIt General Help and Support
I am not quite sure what you mean by "sections", if you mean commas or spaces?! but either way it sounds like you should look at the StringSplit() function. -
Window Probem & Question
automagician replied to unknown12's topic in AutoIt General Help and Support
For #2, if there isn't a better way through the AutoIt GUI functions, you can always use a Dll call: $Hwnd = WinGetHandle("YOUR WINDOW") $menu = DllCall("user32.dll","hwnd","GetSystemMenu","hwnd", $Hwnd, "int",0) DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", 0xF000, "int", 0x0);removes SC_SIZE DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", 0xF030, "int", 0x0);removes SC_MAXIMIZE Edit: Regarding #1, have you tried something along these lines: GUISetOnEvent($GUI_EVENT_CLOSE, "_Foo") Func _Foo() Exit(0) EndFunc I haven't worked a lot with the AutoIt GUI's so if it doesn't work I am sorry, I am just trying to help. So I hope that helps a little, but there has to be an AutoIt function that controls the sizing functionality. Regards... -
Ok, if I understand your last post, you are starting to get a grasp of what you need to do, so if you need further assistance just give a shout...
-
How about this: $initial = DllCall("user32.dll","short","GetKeyState","int", 0x55) While 1 $ret = DllCall("user32.dll","short","GetKeyState","int", 0x55) If NOT ($ret[0] = $initial[0]) Then ; Do what you want here!!! Exit(0) EndIf WEnd Now you don't have to tie up the HotKey
-
You have the Send("{F9}") in the loop take it out of the loop and it will do it after the 19th is clicked. Edit: Also to exit out of the script, you could have just right clicked on the AutoIt icon in the bottom right hand tray and selected exit.
-
Wow, I was making it much harder than it had to be
-
What did you use? I was going to say use something with this statement, but I didn't get it working yet: $ret = DllCall("user32.dll","short","GetAsyncKeyState","int", "55")
-
please help with controlclick
automagician replied to mattfaust's topic in AutoIt General Help and Support
You shouldn't have to wait 2 minutes, one of the above methods should work. Typically it's not good automation practice to use a wait statement in this case, becasue if the popup comes up in 20secs, you are wasting 1m 40s of time.... Did you try using text that is specific to the popup window? I believe you will still run into the same problem using the suggestions from Slim, because the main window has the same title....right Slim? Slim, Did you see the post about the popup having the same window title as the main window? Won't this cause the same problem if sent too early? -
please help with controlclick
automagician replied to mattfaust's topic in AutoIt General Help and Support
WinWaitActive ( "title", ["text"], [timeout] ) Try adding text to WinWaitActive that is specific to the box with the close button that you are trying to click. or WinClose() if the button click isn't important. Let me know if that helps... -
please help with controlclick
automagician replied to mattfaust's topic in AutoIt General Help and Support
WinActivate("iScope v2.24.3") WinWaitActive("iScope v2.24.3") ControlClick("iScope v2.24.3", "", 29799) ControlClick looks for the Control ID, which in this case is 29799 -
$i = 1 While $i <= 25 MouseDown("right") MouseUp("right") Sleep(1000) $i = $i + 1 WEnd
-
AutoIT vs Quick Test Pro
automagician replied to automagician's topic in AutoIt General Help and Support
Condoman- Yes, but how hard would it be to add this functionality to AutoIt? -
AutoIT vs Quick Test Pro
automagician replied to automagician's topic in AutoIt General Help and Support
Thanks for the response Alterego... I will be anxiously awaiting this functionality If anyone has more info, please keep me updated... Thx -
Does anyone know offhand why I can view edit box and button object on a webpage via Quick Test Pro's Object Spy, but I can't view those same objects using AutoIt's Window Info tool? The web app was developed in ASP. The Window Info tool can see the combo boxes, but not the others. What does Quick Test Pro have that the Window's Info tool doesn't??? What needs to be added to support this? If someone knows that much, is it possible for the Window's Info tool to be updated so it can see these objects in a web app written in ASP?
-
Find text from file.txt and display in MsgBox
automagician replied to sutefan's topic in AutoIt General Help and Support
Yes, you are on the right track and should be able to do all that you described you wanted to do in your post. If you have troubles once you get started, post your code and your problem, and I will be happy to help -
Easy enough... You can even use /O to sort in whatever order you'd like them to be listed. Well that about covers that
-
How embarrassing.... Yes, that slipped my mind. I believe back when I was doing it I was only concerned with the files. Regardless, I would be interested in what you have for subdirectories and their files.
-
Here's my version if anyone was interested, although it's not nearly as cool as cyberslugs : #Include <process.au3> #include <file.au3> $dir = "C:\" $foo = _Foo($dir) Func _Foo($loc) Local $array Local $file = "C:\\abc.txt" _RunDOS("dir /B " & $loc & " > " & $file) _FileReadToArray($file, $array) FileDelete($file) Return($array) EndFunc