LoganWitt Posted December 19, 2012 Posted December 19, 2012 As the title says, it probably sounds extremely simple to all of you super techies, but allow me to say this first. I'm no computer whiz. I just like playing games, although I don't have much time for it. (Which is why I'm looking into making this). I'd really like some help, and if someone does just outright do the 5 seconds of work I'm sure you guys could do this in (which would take me like 5 days to even begin to attempt) that would be great, but I would also appreciate a more human like walkthrough in making something simple such as this. I did read a good deal of the helpfile, but a lot of it I just didn't understand. I don't know any "languages" or any fancy computer stuff. I'm a complete newbie. I've even tried making a script that just changes windows to the window I want the key pressed on, but for some reason when I ran it as a script nothing happened :/ not sure what I did wrong. Anyways here's the details on the script : I want it to of course swap to the window so the key pressing works on that window, then I want it to press a single keyboard key once every 5 minutes and 30 seconds. (I'll probably be at work, class, or sleeping while this is happening). That's it. So yeah, it sounds super easy, but I can't find anything to do it for me, nor can I make it. Really appreciate any help the nice people of this community could give to me Thanks!
tp9191 Posted December 19, 2012 Posted December 19, 2012 (edited) As the title says, it probably sounds extremely simple to all of you super techies, but allow me to say this first. I'm no computer whiz. I just like playing games, although I don't have much time for it. (Which is why I'm looking into making this).I'd really like some help, and if someone does just outright do the 5 seconds of work I'm sure you guys could do this in (which would take me like 5 days to even begin to attempt) that would be great, but I would also appreciate a more human like walkthrough in making something simple such as this. I did read a good deal of the helpfile, but a lot of it I just didn't understand. I don't know any "languages" or any fancy computer stuff. I'm a complete newbie.I've even tried making a script that just changes windows to the window I want the key pressed on, but for some reason when I ran it as a script nothing happened :/ not sure what I did wrong.Anyways here's the details on the script : I want it to of course swap to the window so the key pressing works on that window, then I want it to press a single keyboard key once every 5 minutes and 30 seconds. (I'll probably be at work, class, or sleeping while this is happening).That's it. So yeah, it sounds super easy, but I can't find anything to do it for me, nor can I make it.Really appreciate any help the nice people of this community could give to me Thanks!while 1sleep (330000)winactivate ("title of window")send ("key here")wendlike that or something?why don't you post the script that you have... Edited December 19, 2012 by tp9191
LoganWitt Posted December 19, 2012 Author Posted December 19, 2012 (edited) Now I know what winactive and send do, but what are the while 1 and sleep 330k and wend for? So far I just have WinActivate ( "title" ) Not sure where to go from there, but once I understand the above question I think I can finish it Edited December 19, 2012 by LoganWitt
tp9191 Posted December 19, 2012 Posted December 19, 2012 (edited) while 1 and wend are to loop the script so that it repeats. while 1 is at the beginning of what you want to loop. wend stands for while end, obviously it is where you want the script to stop looping. sleep pauses the script. in your case you want it to pause for 5 minutes and 30 seconds. you need to convert that to milliseconds... so that comes out to 330000. i'm also somewhat a newbie so i'm not sure if you can just use minutes/seconds form instead of milliseconds for sleep. Edited December 19, 2012 by tp9191
tp9191 Posted December 19, 2012 Posted December 19, 2012 for winactivate use the au3 info tool to get the window title. also i suggest reading the help file under winactivate.
water Posted December 19, 2012 Posted December 19, 2012 Please make sure to read the forum rules and you will learn that any kind of game automation isn't allowed here. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
LoganWitt Posted December 19, 2012 Author Posted December 19, 2012 (edited) Ooh, you're obviously smarter than me since you've already figured all this out! Thanks for the tips, I'll give it a try with the lines you gave me and see if I can get it working. How would I send just a single letter? Is there a code for it? I couldn't find that in the help file. Also sorry Water, didn't know that. D: Can't really edit it now to say something else though. Edited December 19, 2012 by LoganWitt
tp9191 Posted December 19, 2012 Posted December 19, 2012 if you are trying to automate a game, then bad bad bad. and i can't help you any further.
LoganWitt Posted December 19, 2012 Author Posted December 19, 2012 Ah darn, I'm sure others are here doing the same they were just smarter in how they worded their post xD
guinness Posted December 19, 2012 Posted December 19, 2012 Ah darn, I'm sure others are here doing the same they were just smarter in how they worded their post xDI doubt it. The truth always comes out in the end via posting code. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
Moderators Melba23 Posted December 19, 2012 Moderators Posted December 19, 2012 LoganWitt,I'm sure others are here doing the same they were just smarter in how they worded their postProbably an accurate assessment - but as you have essentially admitted the offence...... 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
Recommended Posts