GoronSlayer99 Posted November 6, 2005 Share Posted November 6, 2005 (edited) Okay... well... I've done several searches and I can't get it to work. It just wont run my code. Sooo, could someone give me the exact code I would use so that I can learn off of this? It's a very simple code: while 1=1 Send("{Left}") Send("{Left}") Send("{S}") Send("{Right}") Send("{Right}") wend This works in FFVIII. Back and fourth, S to attack. It works but I need to have it work while the the window is minimized. For reference, the window name is "FF8". As said before, I'm sorry, I just don't understand what I'm doing wrong. Edited November 6, 2005 by GoronSlayer99 Link to comment Share on other sites More sharing options...
fastnick1oo Posted November 6, 2005 Share Posted November 6, 2005 Try this: While 1 ControlSend("FF8", "", "", "{LEFT}") ControlSend("FF8", "", "", "{LEFT}") ControlSend("FF8", "", "", "{S}");if this doesn't work change to "{s}" ControlSend("FF8", "", "", "{RIGHT}") ControlSend("FF8", "", "", "{RIGHT}") WEnd Or... Opt("SendKeyDelay", 100) While 1 ControlSend("FF8", "", "", "{LEFT} & {LEFT} & {S} & {RIGHT} & {RIGHT}");same as above (with s) WEnd SciTE - much better than notepad. ; ] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 6, 2005 Moderators Share Posted November 6, 2005 ControlSend("FF8", "", "", "{LEFT} & {LEFT} & {S} & {RIGHT} & {RIGHT}");same as above (with s) That doesn't look right at all. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
LxP Posted November 6, 2005 Share Posted November 6, 2005 Very close: While 1 ControlSend('FF8', '', '', '{LEFT 2}s{RIGHT 2}') WEnd Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 6, 2005 Moderators Share Posted November 6, 2005 (edited) ControlSend("FF8", "", "", "{LEFT 2}" & "{S}" & "{RIGHT 2}") Was missing quotes in the right spot, try that now. Edit: HA!... too quick Alex!! Edited November 6, 2005 by ronsrules Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
fastnick1oo Posted November 6, 2005 Share Posted November 6, 2005 Huh? Why? It sends left, left, s, right, right with 100ms wait after key send. I use same "combo" with my WoW and it works. SciTE - much better than notepad. ; ] Link to comment Share on other sites More sharing options...
GoronSlayer99 Posted November 6, 2005 Author Share Posted November 6, 2005 (edited) Thanks but I'm having a bit of a problem. I have a program I use to run my disc. In that program, it shares the same window name. When I click one of the "tabs" at the top of the screen it appears as if the script is running. I can tell it's pressing "S" becuase my computer beeps and the window goes inactive. However, once I run my game, it just sits there as if it's not doing anything, whether the window in active or not. I did try both of your methods btw... EDIT: Wow, I should press refresh every now and then...lemme try it now Edited November 6, 2005 by GoronSlayer99 Link to comment Share on other sites More sharing options...
fastnick1oo Posted November 6, 2005 Share Posted November 6, 2005 Try this: WinSetTitle ( "title", "text", "newtitle" ) SciTE - much better than notepad. ; ] Link to comment Share on other sites More sharing options...
GoronSlayer99 Posted November 6, 2005 Author Share Posted November 6, 2005 Try this:WinSetTitle ( "title", "text", "newtitle" )Okay, thanks, but what do you mean by "newtitle"? Link to comment Share on other sites More sharing options...
LxP Posted November 6, 2005 Share Posted November 6, 2005 Huh? Why?It sends left, left, s, right, right with 100ms wait after key send.I use same "combo" with my WoW and it works. Because this:ControlSend("FF8", "", "", "{LEFT} & {LEFT} & {S} & {RIGHT} & {RIGHT}")will send left arrow, space, Shift+7, space, left arrow, space, Shift+7, space, S, space, Shift+7, space, right arrow, space, Shift+7, space, right arrow.The & symbols need to be outside the string for concatenation to take place. You meant this:ControlSend('FF8', '', '', '{LEFT}' & '{LEFT}' & '{S}' & '{RIGHT}' & '{RIGHT}')which is equivalent to this:ControlSend('FF8', '', '', '{LEFT}{LEFT}{S}{RIGHT}{RIGHT}')which is equivalent to this:ControlSend('FF8', '', '', '{LEFT 2}s{RIGHT 2}') Link to comment Share on other sites More sharing options...
LxP Posted November 6, 2005 Share Posted November 6, 2005 (edited) Thanks but I'm having a bit of a problem. I have a program I use to run my disc. In that program, it shares the same window name.I would suggest identifying the game window via some window text (if any) and/or by class name (which will be reported by AutoIt Window Info). Then you can do this:Opt('WinTitleMatchMode', 4) While 1 ControlSend('ClassName=(whatever)', '', '', (etc.)) WEnd Edited November 6, 2005 by LxP Link to comment Share on other sites More sharing options...
fastnick1oo Posted November 6, 2005 Share Posted November 6, 2005 Oh... my falt. I didn't noticed it. You know it's kinda late... Forgive me. SciTE - much better than notepad. ; ] Link to comment Share on other sites More sharing options...
GoronSlayer99 Posted November 6, 2005 Author Share Posted November 6, 2005 Well I still can't get it to work. The emulator (No, the game is not downloaded, I'm running my own disc from my D drive) works. Ill select "File" or the "run" tab and it will move one tabs over, or make a beep noise indeicating the "S" being pressed, but once I get into the game, the protaganist sits doing nothing. It's getting late and I'll keep trying tomorrow. -Thanks GS Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 6, 2005 Moderators Share Posted November 6, 2005 Try posting your whole code for better results, this is like a dog chasing its tail at the moment. I'm sure someone will give the correct response if they can see what they need to do. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
GoronSlayer99 Posted November 6, 2005 Author Share Posted November 6, 2005 (edited) Try posting your whole code for better results, this is like a dog chasing its tail at the moment. I'm sure someone will give the correct response if they can see what they need to do.Mmmm... Okay, welll basically I've tried all of the codes that you all have posted. If you mean my original code, it is stated in my first post.My code that I last tried, which was also unsuccessful is...While 1 Sleep(500) ControlSend('FF8', '', '', '{LEFT}') Sleep(500) ControlSend('FF8', '', '', '{LEFT}') Sleep(500) ControlSend('FF8', '', '', '{S}') Sleep(500) ControlSend('FF8', '', '', '{RIGHT}') Sleep(500) ControlSend('FF8', '', '', '{RIGHT}') WEndYep...Edit: Okay, this is probably the emulator. Maybe it's kinda using the gamescreen as a foreground? Cuz I can press a key to resort to the emu's main screen... Lemme try something else. Edited November 6, 2005 by GoronSlayer99 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 6, 2005 Moderators Share Posted November 6, 2005 Ok1. Do you have SciTE Editor? If $SciTE_Editor = "0" Then $ClickHere = $SciTE4AutoIt3.exe & $SciTE4AU3UPD.exeEndIf2. Send() will not work on minimized windows.3. Use AutoInfo Tool to find the window title (it will be in SciTE under tools).4. Provide us with the Windows title that SciTE list (can copy and paste it... paste the class too right under title)5. We will show you how to use ControlSend() Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
GoronSlayer99 Posted November 6, 2005 Author Share Posted November 6, 2005 (edited) Ok1. Do you have SciTE Editor? 2. Send() will not work on minimized windows.3. Use AutoInfo Tool to find the window title (it will be in SciTE under tools).4. Provide us with the Windows title that SciTE list (can copy and paste it... paste the class too right under title)5. We will show you how to use ControlSend()Okay...here we go...1.No...well, now I do.2. 3.ePSXe - Enhanced PSX emulator(I could post that right? Before i just said "FF8" and substituted that with "ePSXe - Enhanced PSX emulator")No Control ID...It's blank...5. Edited November 6, 2005 by GoronSlayer99 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 6, 2005 Moderators Share Posted November 6, 2005 And the Class? It will look something like this in the AutoInfo tool: >>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: Run Keystrokes in Minimized Window - AutoIt Forums - Microsoft Internet Explorer Class: IEFrame Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
GoronSlayer99 Posted November 6, 2005 Author Share Posted November 6, 2005 And the Class?It will look something like this in the AutoInfo tool:>>>>>>>>>>>> Window Details <<<<<<<<<<<<<Title: Run Keystrokes in Minimized Window - AutoIt Forums - Microsoft Internet ExplorerClass: IEFrameThere's no class name either... Link to comment Share on other sites More sharing options...
GoronSlayer99 Posted November 12, 2005 Author Share Posted November 12, 2005 Mmm, I don't know the minimum time before bump but it's most likely over now. I sent Ronsrules my info window, and he hasn't responded... I still don't know what's wrong soo... BUMP. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now