The pixlegetcolor script rectified the matter by providing the exact color code for that exact pixle resulting in a successful trigger. P.S., a typo (extra comma) in the code section removed, after testing it myself. If above MsgBox never pops up, and you know your Mic avatar has turned colour, then you are simply not tracking the right pixel. MsgBox, Button_Color is now %Button_Color% If (Button_Color != Initial_Button_Color) PixelGetColor, Initial_Button_Color, 841, 1002 ![]() But that won't help, but only hinder, if we haven't addressed the basics, i.e., whether you are actually monitoring the "salient" pixel. We could fairly easily switch to detecting for change. If colour never becomes "0x3CDCEB" at "841, 1002", then obviously we are waiting in vain. PixelGetColor is a "native" AHK V1 "asset" going back to the very beginning of AutoHotKey. What you need to get accomplished should really be a very, very simple thing. But I can't swim in deep waters so I am not going to walk you off such planks.Īlright. I am also certain there are more sophisticated tools Windows programmers use that can "disclose" the messaging to-and-fro windows/processes that may aid you. Again, I don't have DMO, so can't precisely comment on what works best. In the case of DMO bar, using Screen for CoordMode is more advantageous, at least I feel. The old bundled AU3.exe (from AutoIt) and the newer bundled WindowSpy.ahk in AHK installation package will both give you coordinates if you just hover your mouse. Now you can also experiment with things like ControlClick and ControlSend, which won't steal your focus away.ģ. In "production", you'd simply send the NumPad + key in AHK in lieu of clicking a set of coordinates, since NumPad + works globally in DMO, AFAIK. Since I don't have DMO, you'd have to test it yourself. I wouldn't use it myself unless I have no other choice, because it physically moves the mouse out of wherever you are dictating and cause you to lose focus, possibly screwing up DMO in anchored mode. I used "click" in the proof-of-concept above. But for a potentially very high usage script that you need to pause and unpause throughout the day, Esc can't be beat.Ģ. Obvious any hotkey such as "pause" or "^i" would do. Pause, toggle, 1 needs to have any non-0 number after toggle or else won't resume. ![]() ![]() You can use a HOTKEY to pause the script, e.g.: I think you are better off leaving the Dragon Box in one spot, so coordinates change little. And I am not sure how big the area of colour change on the DMO bar effects. But it may not be so easy to move it back to the targeting coordinates, especially manually, when you need to reactivate. On your question of how to stop/start it, short of closing/relaunching the AHK script itself: moving the DMO "dragon box" manually out of the Pixel targeting coordinates would certainly work. Here for simplicity I am testing for a specific pixel colour of "0x5A67C5", which I found out is the colour of the Mic avatar in an off state, simply by having AHK first regurgitate the colour at above coordinates through something like "MsgBox, %Button_Color%" (don't do that inside a loop of course).Įven though I initially thought not knowing the colour and just evaluating for change at the monitored coordinates would be easier, but this risks getting things completely out-of-sync, as in "constantly turning the Mic off", if the script is activated at the wrong time.ġ. This most simplistic script works to virtually turn the microphone avatar green all the time for me. In fact I just tested PixelGetColor for my "DME" (we won't get into why this zebra even exists in the first place, but suffices to say that it has a "semblance of Dragon bar" to what you see in DMO, which is itself a "semblance of Dragon bar" to the desktop dragon). Well lucky you indeed, if everything, from DMO client to AHK scripts, are local! DMO: Toggle Key when no audio detected from microphone
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |