
Outshynd
Active Members-
Posts
97 -
Joined
-
Last visited
Everything posted by Outshynd
-
SciTE interface Window (What is this?)
Outshynd replied to Skizmata's topic in AutoIt General Help and Support
Use a two-dimensional array. $aHiddenList[$i][0] can hold the window title and $aHiddenList[$i][1] can hold the return from WinGetHandle($aHiddenList[$i][0]). -
Regular Expression and filenames help
Outshynd replied to spac3m0nk3y's topic in AutoIt General Help and Support
If it's always 3 initials, you could just use StringRight to return the 7 pertinent characters (including the .doc). Otherwise, you could StringSplit with a delimiter of " " and read the last value in the array, which would be "XXX.doc". As far as RegExp, I'm sure someone else will be much, much more help than I am. -
ControlClick ignoring coordinates
Outshynd replied to Awwe's topic in AutoIt General Help and Support
I heard a rumor, back in my hacking days, that WoW checks the current mouse position before actually registering the click. I'm not sure if that's true or not but, if so, ControlClick won't work. -
How to get process list and send
Outshynd replied to Erik.'s topic in AutoIt General Help and Support
Global $msg = "Process List:" Global $pList = ProcessList() For $i = 1 to $pList[0][0] $msg &= @CRLF & $pList[$i][0] Next MsgBox(64, "$pList", $msg) Should work. -
Make a hotkey that sets $i to 10000?
-
Problem with INIReadSelection... again.
Outshynd replied to NELyon's topic in AutoIt General Help and Support
I was basically just stumbling around in the dark, but glad I could help -
Wait for Window and run ...
Outshynd replied to enigmafyv's topic in AutoIt General Help and Support
-
Wait for Window and run ...
Outshynd replied to enigmafyv's topic in AutoIt General Help and Support
Until $title = "Unable to connect" Or $title = "%Program Name%" Then let your if..else statement handle what to do. -
Problem with INIReadSelection... again.
Outshynd replied to NELyon's topic in AutoIt General Help and Support
Why are you looping from 1 to the first key in the section? $aINIRead[1][0] is the 'key' in the following example: [section] key=value What are you reading from the INI file that two loops helps you to parse? Shouldn't it just be For $i = 1 To $aINIRead[0][0] Echo($aINIRead[$i][0] & "<br>") Echo($aINIRead[$i][1] & "<br><br>") Next? -
I fail to see the point in a program that spams keypresses in notepad. Maybe, just maybe, it was an example. How many people love the functionality of AutoIt but want multithreading? Holy shit, now maybe someone who doesn't have as much expertise can figure out how to do it. Referencing the component may not be super difficult but for someone who's just picking up a C# IDE--especially someone whose only coding experience is in AutoIt, as with many of the people who visit this site--may find it slightly helpful to know how to add AutoItX3 to their project without having to come to the forums and ask. Did I have a problem with it? No. Am I so arrogant to think that no one else will have a problem with it? No. Do I really want to read and answer multiple threads/questions on how to reference the DLL? No. Did it hurt to take three small screenshots and upload them to a website? No. I don't see the problem here. While I appreciate the commendation, the negativity isn't needed.
-
Most values are stored in memory in 4-byte variables (integers, or 'int'). That said, some are 2-bytes, some are just a single byte, but, more often than not, the value will occupy four bytes in memory, so you can pretty safely assume that anything you search for will be four bytes. First, let me explain how you figure out what size your variable is going to be if you search for it using a four byte search and you come up empty. One byte has a maximum value of 255 (if it's unsigned, 127 if it's signed... more on that later). If you're searching for health and it has a maximum value of 100, chances are you can use a one-byte search and find it just fine. This is because, in memory, values are stored in hexidecimal format, which counts 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. One byte stores two of these numbers/letters. 0xA3 is one byte. It starts at 0x00 and ends at 0xFF. 0xFF = 255. Each F, in hexidecimal, is equal to 15, so 0xFF is equal to 15*15, or 255. I hope that's clear. So, if your value is always going to be less than 255 and you know it will NEVER go above 255--things like facing direction in a 4-directional game which, obviously, will only have four possible values for direction faced--then you can safely assume you're searching for a single byte variable. Two bytes--or a 'short' type variable--has a maximum value of 65535 for unsigned or 32767 for signed. Most of the time, values will be unsigned, so 65535 is the max value for a short type variable. If you know that the value you're looking for will never go above 65535, search two bytes. An example of this might be x or y coordinate on a tile-based game. If the map has 300x300 tiles in it and you're standing at coordinates 269, 4, obviously your x coordinate is not a single-byte variable (it's > 255), so search for two bytes. Again, minimum value of 0x0000 (0) and maximum value of 0xFFFF (65535). Four bytes--or an 'int' type variable--has a maximum value of 4294967295 (that's 4.29 billion) unsigned and 2147483647 signed. Most values fall into this category. Your character's identification number or experience points might be more than 65535 but less than 4.3bil. Anything that has a relatively large number--or whose number you just don't know--is (probably) an integer. Now then, signed or unsigned? Signed variables go into negatives. We said that a signed byte has a max value of 127 but it has a minimum value of (NEGATIVE) -128. If you're looking for a variable, such as damage modifiers or something, that has a maximum value of more than 127, less than 255, but it can go into negatives as well, search two bytes. Just because the max value is less than 255 doesn't mean it's automatically a byte, especially if it can go into negatives. In conclusion for signed/unsigned: unsigned integers do not have negative values while signed integers may. When I get a little bit more time, I may go into memory searching/reading/writing a bit more in-depth. For now, knowing what type of value to search for will help you astronomically. It'll refine your searches by a lot. Don't search for a byte if you know it's a short; don't search for a short if you know it's an int. Sure, its current value MAY BE less than 65535, but if it has the POSSIBILITY of having a value higher than 65535, it's stored as an integer, so you don't have to look through every two bytes in memory. Something with a value of 1000 that's stored as an integer will just have 00s as its leading two bytes, i.e. 0x000003E8. It's still an int, though. Hope it was of SOME help, anyway.
-
How to hide my autoit programme process?
Outshynd replied to mangle's topic in AutoIt General Help and Support
If you write and compile your program in C++, not only do you have a long road ahead of you but what would be the point of using AutoIt? I suppose you could use AutoItX3 and that might make you a LITTLE bit harder to detect, but not much. As long as you're not manipulating memory in WoW, Warden probably won't detect you. I say probably because Warden changes every time the server sends it to your client to be executed, but I'm 90% sure you won't have a problem if all your program is doing is sending key presses every 20-30 seconds. -
I wrote this for another forum but I figured I'd post it here as well. Hopefully it'll help some poor, lost soul. C# is a much faster and more complete language than AutoIt. That said, it's also far more difficult to do simple tasks that AutoIt does quite well. You have to write your own MouseMove functions, your own WinActivate functions, your own everything functions (nearly). This is because AutoIt is a Windows automation tool and C# is an actual programming language. Well, can we have the best of both worlds? Sure. This describes how to add AutoItX (the AutoIt COM Library DLL) to your C# (or other .NET) project and then execute a few simple instructions. http://www.nomorepasting.com/paste.php?pasteID=72980 using System; using System.Threading; namespace AutoItXTest { class Program { static AutoItX3Lib.AutoItX3Class au3; //our au3 class that gives us au3 functionality static Thread thread; //our thread static bool threadshouldexecute = true; //only execute thread 2 while this equals true static int i = 0; //our incrementer /// <summary> /// The entry point, or main thread / main loop, of our program /// </summary> static void Main(string[] args) { au3 = new AutoItX3Lib.AutoItX3Class(); //initialize our au3 class library au3.AutoItSetOption("WinTitleMatchMode", 4); //advanced window matching thread = new Thread(new ThreadStart(threadtest)); //initialize and start our thread thread.Start(); if (au3.WinExists("Untitled - Notepad", "") == 0) //if an Untitled - Notepad document doesn't exist au3.Run(@"C:\WINDOWS\SYSTEM32\notepad.exe", "", au3.SW_SHOW); //run notepad else au3.WinActivate("Untitled - Notepad", ""); //otherwise activate the window string hWnd = ""; //let's use a window handle while (hWnd.Length == 0) //try to get a handle to notepad until it succeeds hWnd = au3.WinGetHandle("Untitled - Notepad", ""); while (au3.WinActive("handle=" + hWnd, "") == 0) //loop while it's not active { au3.WinActivate("handle=" + hWnd, ""); //and activate it Thread.Sleep(100); } while (au3.WinExists("handle=" + hWnd, "") != 0) //while the window exists, loop { //send our incrementing variable, i, to notepad, with a trailing | au3.ControlSend("handle=" + hWnd, "", "Edit1", i.ToString() + "|", 0); i++; //increment i Thread.Sleep(100); //short sleep so we don't burn CPU } //if the while loop exited--because there's no Untitled - Notepad--make the other thread stop executing threadshouldexecute = false; Console.Write("Press [ENTER] to continue..."); //tell the user to press ENTER to quit Console.ReadLine(); //pause until enter is pressed } /// <summary> /// our void function to execute thread #2 /// </summary> static void threadtest() { while (threadshouldexecute) //loop while this thread should execute { au3.ToolTip("Thread 2\ni: " + i.ToString(), 0, 0); //display a tooltip with the incrementing variable i in it Thread.Sleep(50); //sleep to free up CPU } au3.ToolTip("", 0, 0); //clear the tooltip after loop is done } } }
-
Just open the help file and look at some examples to get you started. There's a few topics that will introduce you to AutoIt on these forums, too.
-
Send the {Enter} key with ControlCommand()
Outshynd replied to PerryRaptor's topic in AutoIt General Help and Support
$hWnd = ControlGetHandle("Untitled - Notepad", "", "Edit1") $user32 = DllOpen("user32.dll") $ret = DllCall($user32, "int", "MapVirtualKey", "int", 0x0D, "int", 0) $lParam = BitOR($ret[0] * 0x10000, BitAND(1, 0xFFFF)) If IsArray($ret) Then DllCall($user32, "int", "PostMessage", "hwnd", $hWnd, "int", 0x100, "int", 0x0D, "long", $lParam) Sleep(1) DllCall($user32, "int", "PostMessage", "hwnd", $hWnd, "int", 0x101, "int", 0x0D, "long", BitOR($lParam, 0xC0000000)) EndIf DllClose($user32) Is that what you're looking for? -
Send the {Enter} key with ControlCommand()
Outshynd replied to PerryRaptor's topic in AutoIt General Help and Support
ControlSend? -
More information is needed to help you. First of all, it sounds like you're having problems with Dynamic Memory Allocation; there are many, many tutorials on the internet of how to 'defeat' DMA. Secondly, no one can help you if you don't explain in more detail what you're talking about. What program are you reading memory from? Do you find the address each time you run the program or does it sometimes stay the same? The easiest thing would probably be to post your script and the program you're reading memory from. I'm not sure anyone would download an executable but if it's a commercial program or a script you wrote then you might get some bites.
-
; Click on Start Speed test button ControlClick("MySpeed Broadband Speed Test - Microsoft Internet Explorer", "", 1, "left", 2) sleep(20000) Try this?
-
A better way to do it would be ControlClick. Check the helpfile or post back if you have problems.
-
You're very welcome By the way, not that it matters -at all-, but it's good to get into the habit of formatting loops with the UBound of the array you're actually looping on, instead of another. I know that the UBound of $status and $g_Account are going to be the same, but in some other program somewhere down the road, $g_Account is going to change while you're looping on $status and you'll run into errors. For $id = 1 To UBound($status) - 1 will avoid that, even though it's probably not a problem in this particular script. Just nitpicking, now; sorry I've been reading coding forums too long: I read that as 'compiled' six or seven times and couldn't figure out what the hell you were trying to say
-
Write a loop that checks if messages need to be processed while sleeping SMALL amounts of time that add up to 2 seconds. $timer = TimerInit() Do CheckProcessQueue() Sleep(50) Until TimerDiff($timer) >= 2000 I'm sure you can figure something out.
-
If PixelGetColor(535, 863) = 0x83829D ThenoÝ÷ Ø(^rKaz±zW(Ú·ùóÚ¨§²Ý1ó6ô8¶²ßÚÞz««¢+Ù5½ÕÍ ±¥¬ ÅÕ½Ðí±ÐÅÕ½Ðì°ÔÌÔ°àØÌ¤Click the mouse at the same coordinates. It's all detailed in the help file. Hopefully this will give you a boost in the right direction.
-
^ Are you getting any error? You may want to do something like MsgBox(64, "ControlHandle", ControlGetHandle("Outlook", "", "MsoCommandBar1")) to make sure it's not returning zero.
-
Is "Menu Bar" the ClassNameNN of Outlook? I don't know but it sure doesn't look right. Also, if AutoIt runs, you have user32.dll. It comes with Windows.
-
Try 0 as the wParam of the 2nd PostMessage? You probably have already but that's all I can think of.