Miranda
Active Members-
Posts
46 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Miranda's Achievements
Seeker (1/7)
0
Reputation
-
Miranda reacted to a post in a topic:
Url Encoder / Decoder functions
-
Thanks for this piece of code, it was useful to me old post: Is the code only broken for me? I got a --URL::5e1cd925cceeb0b8f1f0f4b9c11e2e45-- or similar before each line that isn't a comment, what's up with that? Edit: As soon as I posted, it vanished... Edit 2: So I wasn't crazy, it's the same on this thread: '?do=embed' frameborder='0' data-embedContent>> Edit 3: Okay, now I got it... It's the highlighting: ?hl=%2Burl+%2Bdecode'>?hl=%2Burl My bad.
-
For loop with changing Step value
Miranda replied to Miranda's topic in AutoIt General Help and Support
You guys are hilarious Thanks a lot for all the answers! The first post was only a proof of concept, but I didn't think of just using do and incrementing it manually, which works perfectly -
unfortunately this: $step=1 for $i=1 to 1000 step $step Tooltip($i) Sleep(50) $step+=1 Next Doesn't work (or well, the step the for loop uses is always 1) Is there a way to get this to work?
-
Change default AutoItSetOption values for all scripts
Miranda replied to Miranda's topic in AutoIt General Help and Support
@water: I exclusively meant for running .au3 scripts, the issue is I keep forgetting to set Opt("TrayIconDebug", 1) ;0=no info, 1=debug line info, and it's like the fifth time a script was hanging somewhere, and I would have loved to see at what script line it was, but since I hadn't set the Opt I couldn't see the line it was on. I think an include file is the simplest solution. It's still something I have to remember, but at least it'll make things much easier, thanks! @guinness: In no particular order of how frequent I need them: Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client Opt("TrayIconDebug", 1) Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase Opt("MouseClickDragDelay", 25) ;250 milliseconds Opt("ExpandVarStrings", 1) Opt("PixelCoordMode", 0) ;1=absolute, 0=relative, 2=client Opt("WinDetectHiddenText", 1) ;0=don't detect, 1=do detect Thanks for the hint about ExpandedEnvStrings! -
I find myself constantly changing several Opt()'s, and I was wondering if it wouldn't be possible to change the default values for them? I mean these options: http://www.autoitscript.com/autoit3/docs/functions/AutoItSetOption.htm My apologies if this was already asked, I couldn't find it in a search. Thanks
-
Problems using a hotbutton (` on german keyboard: §)
Miranda replied to Miranda's topic in AutoIt General Help and Support
This doesn't work anymore... I've confirmed that ASC(§) is still 0167, and I've also tried with the unicode (which is 167) So basically HotKeySet("{PAUSE}", "EndScript") $Key = Chr(0167) HotKeySet($Key, "fSpace") While 1 Sleep(100) WEnd Func EndScript() Exit EndFunc Func fSpace() MsgBox(0, "title", "yeah") EndFunc No longer works to capture the key left of the 1 on a keyboard set to German (Switzerland). I've also tried with $key=ChrW(167). In those 6 years my OS changed to Win 7 64bit, my computer changed... Anyone know of any code changes that might have brought this about? Or have any suggestions? Thanks in advance -
Miranda reacted to a post in a topic:
IseeDumbfucks
-
Miranda reacted to a post in a topic:
The Question You ALL Hate 0.0
-
Miranda reacted to a post in a topic:
[HELP] Triggerbot / Shotbot
-
Miranda reacted to a post in a topic:
Send Arrow key, stop at certain time.
-
So, I switched to Windows 7 not terribly long ago, and I was all happy and stuff... However, for replaying terribly old games I need to use _MouseTrap due to my two monitors, and the script I do this with is this: (some game specific lines/tooltips removed) Func _mouselock() Dim $dimi[50] $dimi[0] = 4 $dimi[1] = "Jagged Alliance 2" $dimi[2] = "Neverwinter Nights v.8109" $dimi[3] = "Deus Ex : Invisible War" $dimi[4] = "Outcast - Wed May 10 11:59:24 2000" For $i = 1 To $dimi[0] If WinActive($dimi[$i]) And $mouselocked = 0 Then _MouseTrap(0, 0, @DesktopWidth, @DesktopHeight) $mouselocked = 1 $activewin = WinGetHandle("") EndIf Next If Not WinActive($activewin) And $mouselocked = 1 Then _MouseTrap() $mouselocked = 0 EndIf EndFunc ;==>_mouselock It used to work flawlessly, but it doesn't anymore... So I did some toying around, and made this simple script: #include <Misc.au3> sleep(1000) _MouseTrap(0, 0, @DesktopWidth, @DesktopHeight) While 1 sleep(1000) Wend And to my surprise, the MouseTrap doesn't work... Or actually, more precisely, it will snap the mouse back to the defined area once, and that's it. I haven't managed to get MouseTrap to work under Win 7. Incidentally, the same thing happens if in a game, if I change the script to _MouseTrap every 3 seconds, every three seconds the mouse will pop back to screen, but it never sticks. I did some digging, and found that MouseTrap is ClipCursor, and after some googling I didn't find any reports that it doesn't work with Windows 7, so is it just me? I did however read somewhere that ClipCursor stops working when they alt+tab, so maybe it has something to do with the Autoit script not being the active window? Anyways, I'm stumped, any input (even if it's a different solution to stop the cursor from going off-screen while in a full screen application), is appreciated!
-
Binary representation of a number
Miranda replied to Miranda's topic in AutoIt General Help and Support
Thanks a ton, both of you -
I did some searching, and some looking at the help files. I would have expected Binary(12) to output 1100, but I found out there's binary, and then there's binary So I guess after having been enlightened, the question becomes Has anyone made a Binary() function that outputs Numbers in Binary format? Or is there a function/option/flag I've overlooked somewhere? Thanks
-
[SOLVED] Changing icons of non-GUI windows
Miranda replied to Miranda's topic in AutoIt General Help and Support
The solution is so damn simple it hurts... The icon only stays changed while the script is running, a simple while + sleep loop makes it all work -
[SOLVED] Changing icons of non-GUI windows
Miranda replied to Miranda's topic in AutoIt General Help and Support
Might want to add that I tried this on a Windows 7 64 bit, and a Windows XP 32 bit, the difference was that on windows xp the alt-tab icon didn't vanish. Oh, and if anyone has a different reliable method of changing the alt-tab icon to something else, please do let me know. Thanks -
[SOLVED] Changing icons of non-GUI windows
Miranda posted a topic in AutoIt General Help and Support
Hey there, Thanks for reading This is my script so far: (credit to trancexx, who posted it somewhere else before) _GUISetIcon(WinGetHandle("[ACTIVE]", ""), "don't", "care") ; name, not ordinal value Func _GUISetIcon($hGui, $sModule, $iName) ; for loaded modules in this shape $iName="G:\Srips\AO\burn.ico" $a_hCall = DllCall("user32.dll", "hwnd", "LoadImage", _ "hwnd", 0, _ "str", $iName, _ "dword", 1, _ ; IMAGE_ICON "int", 32, _ ;32 "int", 32, _ ;32 "dword", 0x10) ; LR_DEFAULTCOLOR Local $hIcon = $a_hCall[0] DllCall("user32.dll", "hwnd", "SendMessage", _ "hwnd", $hGui, _ "dword", 0x0080, _ ; WM_SETICON "dword", 0x1, _ ; 1 = ICON_BIG, 0 = ICON_SMALL "ptr", $hIcon) EndFunc ;==>_GUISetIcon I've checked, the first function gives a handle, what I've managed to get done (by playing around with dword 0x0, iconbig/iconsmall, and the sizes from loadimage) is to change the icon at the top left of a window, which then few seconds later vanishes, aswell as the alt-tab icon vanishing completely, and the icon permanentely changed in the taskbar. What I'm trying to do is the alt-tab icon, the rest don't matter to me... I know this is not strictly an autoit problem, but maybe someone has an idea anyhow? Thanks alot for reading and any answers Kind regards, Miranda -
I've thought of this, and while it does work, the coding effort is too great for my tastes and purposes, but thanks a lot for the input Thanks, I guess what I'm looking for, however, I fear it is a bit too advanced for me... Edit: All things considered, where critically essential, I'll employ timers, and wait until some genius mind comes up with with a ready to use Function that will run in parallel to the rest of the script, for lesser mortals, such as myself
-
I've thought of this a couple times, in different scripts I wrote, that it would be handy if I could run a certain function, and keep on running the main script at the same time. The best example would be: Tooltip("Hello World") Sleep(50000) Tooltip() For this example, another command along the lines of Runin(50000,"Tooltip()") would also work just fine, one that would be a non blocking sleep, that after a given time runs a certain command... However, for other stuff it would be very, very handy if I could be running a function concurrently to the rest of my script. I know I could "simply" Run(...) a different compiled .au3 script, but how can the two share variables? My guess though is that I'm not the first to think about something along these lines, and a much more professional coder than myself already has a ParalellFunc _wee() ... EndParalellFunc sort of thing At any rate, anyone have some insight for me? Kind regards, Miranda