
Wacken
Members-
Posts
12 -
Joined
-
Last visited
Everything posted by Wacken
-
I have a little script that Sends key commands. I do not use anything in the script that uses winhandles. No winactivate or anything remotely like it. I actually tried using that in the first place and thought it was the cause of the problem so i removed it. The problem is; when there are multiple clients active, it only works on the most recent opened client. I cannot understand this since i am not even telling what client the the commands should be send to. I just want them to be send to the active window, allowing me to activate a different window when i want while the script is running. It does work on unrelated different windows or even the desktop. As soon as i close the clients and go to desktop, it keeps activating windows help. It just wont let me choose multiple clients of 1 window. Why ? HotKeySet("{HOME}", "Terminate") HotKeySet("{F12}", "Start") While 1 $x = 1 WEnd Func Start() While $go = 1 Send("{F1}") Sleep(100) Wend Endfunc Func Terminate() $go = 0 EndFunc
-
I have made a very simple script that clicks on a certain position. It also gives a beep to let me know it is functioning. <Removed> Now of course, this needs to click onto something. I run a game in windowed more. It needs to click something in this game. However, first the script does not react to the pause button when the game window is active. I actually need to swich to the script to have it react to the button. So now the game is minimized. Then, if i alt-tab back to the game, the script keeps beeping indicating it is functioning. The game however does not receive its mouse clicks. I can see the mouse is on the right position, if i press the mouse button, it works. But the script is not activation the game's functions even though it keeps beeping. How can i have the script run in the background, capture the button presses (but of course only these buttons that are not needed in the game) while the game is on the foreground, and actually activating the game window with its mouseclicks ? Could it maybe even work with the game in full screen mode ? Thank you
-
Using the function: FileInstall ( "source", "dest" [, flag] ) I would to make an installer for multiple different but simmilar applications. I would like to place the "source" paths and "dest" paths that go with it on top of the file. However: "The source path of the file to compile. This must be a literal string; it cannot be a variable." Is there no option in the compiler to make words that will be replaced by the string i provide with for word and can be used for this function? I used this in CPP in the past, but i don't know the right word for it sort of constants that are replaced at compile time.
-
I assume you mean: Run("C:\Program Files\Intercasino$$$\casino.exe","C:\Program Files\Intercasino$$$") (or you just didnt read my post) That doesn't work either.
-
I just don't get it... My script needs to run a file called "casino.exe". It will first search for this file in the default casino, and if it doesn't find it, it should ask the user where it is. The path is then stored for later use. Since now the path is used as a variable, i think its difficult to use phrases like "@ProgramFilesDir" Ignore the asking for an storage of the path for now and just look at the default path: C:\Program Files\Intercasino$$$\casino.exe First i place the script in the intercasino $$ folder. Run("casino.exe") -This works Now i place the script on desktop. Run("C:\Program Files\Intercasino$$$\casino.exe") -Does not work. Run("C:\Program Files\Internet Explorer\iexplore.exe") -Works just fine Now i see those $$$ and think they may cause a problem. So i place iexplore.exe in the Intercasino folder Run("C:\Program Files\Intercasino$$$\iexplore.exe") -Works fine Now i try using a bat file. I create the file start.bat. Inside it is only "casino.exe". This batfile is in the intercasino folder. -I click the bat file, Intercasino starts. Run("C:\Program Files\Intercasino$$$\start.bat") -Does not work I place the script back in the intercasino folder. Run("start.bat") -Works fine If i make a typo in the script, or i try to start a file that is not there, i get an error message. In the situations above however, i do not get this error message. My PC just seems to think for a while and then decides to do nothing.
-
I found out, i did not make a typo when testing. After some more testing, it does work when i start internet explorer, but it does not work when i try to start this particular executable that i want to start. The strange thing is, when i do not have the pathname in the Run function and i have the au3 file in the same folder with the executable to start, it DOES work. As soon as i have the au3 on desktop and the whole pathname in the Run function, it does not work. I also tried copying another file in the target directory, and that does open just fine. Does anyone have an idea what could cause this ?
-
Thanks. thats not how it is stated in the help files and i thought i tried this, but i must have made a type when trying it
-
If i make this simple script 2 lines long: MsgBox(0,"",FileExists("C:\Program Files\Internet Explorer\iexplore.exe")) Run("iexplore.exe","C:\Program Files\Internet Explorer") The message box tells me "1" so the file exists, but then i get "Error, Unable to Execute the external program. The system cannot find the file specified." Can anyone explain this and tell me how to solve it ?
-
Thanx, I was afraid the pixelsearch and pixelchecksum would be slow, but i had winactivate quite a few times in my functions. This function takes 250 ms :S
-
I call pixelsearch(100,100,200,200,color) The pixel to be found is located on 120,120. 1) Will it return? a: [20,20] b: [21,21] c: [120,120] I want to search 1 line of 50 pixels long: -Pixelsearch(100,100,100,150) -Or i use a loop and check 50 pixels individually for their collor. 2) Does this make a significant difference in exectution speed ?
-
Well, i don't know what code you want. $sum = Pixelchecksum(50,50,70,70) is all it is. The question is how it can be different on different PCs running the same software. More importantly, if it were different for every screen and every area, i would not be so incredibly surprised. But in this case it is casino software and the cards are recognised perfectly on all PC's, only the login screens give different checksums on some PC's. Resolutions does not matter since the software always runs in a 800x600 window. This is just simple software, do those special effects do anything to it? and if so, why do they affect the menu, but not the cards ? How do you solve such problems, any suggestions for another solution to see if login screens are ready instead of using the pixelchecksum ?
-
I am taking information from the screen with pixelchecksum. Usually an area of 10x10 pixels. I do this to see if a login menu is ready logging in for example. Now i have a peace of software installed on 2 PC's. My pixel settings are on client area, so the windows classic/xp settings do not matter. The software is in the same situation on all PC's and shows the same screen. I can absolutely not detect a difference and i certainly could not immagine there being any difference since it is exactly the same software. I use the mousemove commands to check where the pixelchecksum is taken, and on both PC's, it is correctly taken from the same area. How is it possible that there is a difference between the checksum on the PC's ? This is not always the case. For some of the screens it does give the same pixelchecksum on both PC's, for others it does not. In this particular case, it is about 3 menus. I programmed it on my own PC and it works perfectly and consistently on my PC. However on another PC, menu 2 is not recognised because the checksum is different, but the first menu does not cause problems. I just tried it on a third PC, and there the first menu provides a different checksum already.