lokipoki Posted March 3, 2013 Share Posted March 3, 2013 Hi there. I want to quit pcsx2 by holding 2 Buttons for lets say 5 seconds sending esc. Can you guys help me out with a script? Cheers. Link to comment Share on other sites More sharing options...
water Posted March 3, 2013 Share Posted March 3, 2013 Welcome to AutoIt and the forum! Why do you want to use 2 buttons and wait 5 seconds to quit a program? In 5 seconds you could easily close it yourself. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
PhoenixXL Posted March 3, 2013 Share Posted March 3, 2013 Somewhat likewise#include <Misc.au3> #region - UserVars Global Const $sKey = "{ESC}" Global Const $sHexKey = "1B" Global Const $iTime = 5000 ;milli-secs #endregion - UserVars Global $iFlag = False HotKeySet( $sKey, "Timer_Init" ) Func Timer_Init() $iFlag = True EndFunc Local $iTimer While 1 If $iFlag Then $iFlag = False $iTimer = TimerInit() While _IsPressed( $sHexKey ) If TimerDiff( $iTimer ) >= $iTime Then ConsoleWrite("True" & @CR );Execute your function ExitLoop ;execute only once EndIf WEnd EndIf WEnd My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 3, 2013 Moderators Share Posted March 3, 2013 lokipoki,I want to quit pcsx2Could I suggest that you read the Forum rules (there is also a link at bottom right of each page) in the near future. This is as close to the edge (ahh, what a wonderful album that was/is ) as you want to get. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
tp9191 Posted March 3, 2013 Share Posted March 3, 2013 May I ask why you referred him to the rules? I assume it's something in R#1 but I don't exactly know. Just curious. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 3, 2013 Moderators Share Posted March 3, 2013 tp9191, Google the app from which the OP wants to exit and come back if you stil cannot work it out. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
water Posted March 3, 2013 Share Posted March 3, 2013 Melba23 refers to #1, game automation, because pcsx2 is a Playstation 2 Emulator. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
tp9191 Posted March 3, 2013 Share Posted March 3, 2013 Yeah I knew what it was beforehand. But, I was under the impression the rule only applied to games that can possibly have online play, as to not be supporting cheaters here? Hmm I guess not. Also, Videogame console emulators themself are not illegal in any way, that is as long as you use your own games, and BIOS, which is something most people forget. Link to comment Share on other sites More sharing options...
lokipoki Posted March 3, 2013 Author Share Posted March 3, 2013 I want hold 2 Buttons because my HTPC has no keyboard Sorry, I wasn't aware of the emulation rule. Lets just say I want to send esc after I held 2 Buttons for 5 secs. Cheers. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 3, 2013 Moderators Share Posted March 3, 2013 tp9191,The rules say "regardless of the game" - so automating an emulator is, as I pointed out, about as close as you can get without actually breaking the rules. That is why all I did was gently point the OP at them, rather than lock the thread. lokipoki,Your question is fine as it stands - all I wanted to do was make sure you stayed legal in future. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
lokipoki Posted March 4, 2013 Author Share Posted March 4, 2013 Sorry again. I'm using the emulator with copies I own. Which is totally legal. But if that is against the rule it wasn't my intention to make anyone upset here. I should have read the rules before... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 4, 2013 Moderators Share Posted March 4, 2013 lokipoki, As I said above you are fine at the moment - just do not ask for help automating the games themselves. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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