RediXe Posted June 29, 2012 Share Posted June 29, 2012 I'm trying to code a semi-simple addon for Star Wars: The Old Republic game. They do not have an API to write addons (yet) so was hoping to create one that can be run outside the game. Might have other uses as well. Here's the Idea: A key combo is pressed, program will start a count down timer to show when something expires. It's a basic buff/debuff timer. So I create a file that will have the Name of the ability, the key or combo of keys to watch for, and the duration of the buff/debuff (Who ever uses this will have to configure this file themselves but atm I am only one using it) Sample content: Force Breach;^{2};18\ Earth Shield;+{1};8 I tried to StringSplit with "\n" for newline but that didn't work so I made do with the \ but rather not. Maybe an empty " " would work? I get the array that now contains: (does the array auto use [0] for array size?) [1] Force Breach;^{2};18 [2] Earth Shield;+{1};8 What I am having trouble getting to work is turning the above into: [1][1] Force Breach [1][2] ^{2} [1][3] 18 [2][1] Earth Shield [2][2] +{1} [2][3] 8 I'll probably have more issue's later on but this is where I am currently stuck at. #include <File.au3> #include <Array.au3> ; Read File watcher.txt $sStr = FileRead("watcher.txt") $aItems = StringSplit($sStr, "\") Global $aList[1] For $x = 1 To UBound($aItems)-1 Local $aTemp = StringSplit($aItems[$x], ";") _ArrayAdd($aList, $aTemp) _ArrayDisplay($aList, "K") Next For $x = 1 To UBound($aList,1) For $y = 1 To UBound($aList,2) MsgBox(0, 'Record: [' & $x & '][' & $y & '] ', $aList[$x][$y]) Next Next Link to comment Share on other sites More sharing options...
Mechaflash Posted June 29, 2012 Share Posted June 29, 2012 (edited) *herp* Forum Rules *derp* Edited June 29, 2012 by mechaflash213 Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.” Link to comment Share on other sites More sharing options...
BrewManNH Posted June 29, 2012 Share Posted June 29, 2012 Please don't post in these types of threads, just report them and move on. Let the moderators point the miscreants in the right direction. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
RediXe Posted June 29, 2012 Author Share Posted June 29, 2012 (edited) What is wrong with this thread? Please explain. Automating games or game servers. This rule is zero tolerance. Any discussion of using AutoIt to launch or interact with a game or game server violates our rules. See below for more details.Scripts or programs that violate the license agreement for software. If a program explicitly says no automation, do not discuss automation of that software here.If it's related to that I'm not trying to automate anything just trying to display a countdown when a specific key/key combo is hit on the keyboard. It's has nothing to do with the game itself, it could be a kitchen timer so when I hit "S" a timer auto starts counting down. Edited June 29, 2012 by RediXe Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 30, 2012 Moderators Share Posted June 30, 2012 RediXe,What is wrong with this thread? Please explainYou stated from the outset that this was for use in a game - therefore it falls foul of our rules. If you wanted to code a timer for key press combinations you should have asked how to do that - mentioning that it was for a game was not the way to do it. And please do not repost the question not using the word "game" - read the rules carefully. Anyway, thread locked. 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