Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Win Key not working, and more 1.1.11.2



  • Please log in to reply
12 replies to this topic
BXF
  • Members
  • 13 posts
  • Last active: Jul 31 2013 09:45 PM
  • Joined: 24 Jun 2013

Just installed 1.1.11.2, and my scripts stopped working. In one case, neither # nor {LWin} work. In another, I get insufficient storage error (or something like that) on a statement that works in the previous version of AHK: for window in ComObjCreate("Shell.Application").Windows.

 

Reinstalling 1.1.11.1 fixes everything.

 

Am I the only one with problems?



SnowFlake_FlowSnake
  • Members
  • 845 posts
  • Last active: Jan 24 2016 05:24 PM
  • Joined: 08 Oct 2012

hi, show your code plz ^.^


  • Download link of my scripts on Autohotkey.com 2/10/2015 [DOWNLAND]
  • Contact Info:  https://github.com/floowsnaake //  FloowSnaake(A)gmail.com
  • IF you need Help send me a PM,Email or Post on Github

  • Quote by tank  Posted 29 September 2015 - 06:14 PM

  • "Eventually i will find a way to convert the DB back to PHPBB3. but i dont have the bandwidth right now. No one that has tried has had success. It is the Only way i can keep this open is if i could successfully convert it."

BXF
  • Members
  • 13 posts
  • Last active: Jul 31 2013 09:45 PM
  • Joined: 24 Jun 2013

hi, show your code plz ^.^

Even a one line script that says #{Left} does not work. But here is a script I actually use:

 

;#!n::                                                            ; ^=Ctrl  !=Alt  #=Winkey  +=Shift
;Omit the above line if script is to be compiled to an .exe. Also, the shortcut keys indicated above are not necessarily those used to invoke the .exe

    Run, C:\Windows\System32\devmgmt.msc
    
    J = 0
Waitmore:
    IfWinNotActive Device Manager
    {
       J += 1
       If J > 50
          Exit
       Sleep, 100
       Goto, Waitmore
    }
    
    Send #{Left}
    Sleep, 50
    
    Send !VW                                    ; ALT+V (Activate View menu), then W (Show hidden devices)
       
    Exit

 

Thanks for looking.



rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011
Seems to work fine on my system. Describe the failure you are seeing.

Sorry to nitpick your code, but your Waitmore loop could be replaced with WinWaitActive Device Manager, , 5 and Send {Left} has the same effect as Send #{Left} in the device manager.

My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


HotKeyIt
  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008
Run, C:\Windows\System32\devmgmt.msc
Winwait,Device Manager,,5 ; Wait 5 secs for window to appear
If ErrorLevel ; Window did not appear
  ExitApp
WinActivate,Device Manager ; make sure window is active
Send #{Left}
Sleep, 50
Send !VW 


BXF
  • Members
  • 13 posts
  • Last active: Jul 31 2013 09:45 PM
  • Joined: 24 Jun 2013

Feel free to nitpick, as I'm totally new to this, and I welcome suggestions of correct technique. I will certainly try out WinWaitActive.

 

However, I don't see your point with the {Left}. #{Left} (i.e. WinKey+Left) shifts the window to the left half of the screen, which is a standard Win7 feature. {Left} by itself does nothing. In fact, this is precisely the failure in this particular script: the #{Left} has no effect, though it works as expected with AHK 1.1.11.1.



BXF
  • Members
  • 13 posts
  • Last active: Jul 31 2013 09:45 PM
  • Joined: 24 Jun 2013
Run, C:\Windows\System32\devmgmt.msc
Winwait,Device Manager,,5 ; Wait 5 secs for window to appear
If ErrorLevel ; Window did not appear
  ExitApp
WinActivate,Device Manager ; make sure window is active
Send #{Left}
Sleep, 50
Send !VW 

OK, another technique. Thanks for this one, too.



rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011

However, I don't see your point with the {Left}. #{Left} (i.e. WinKey+Left) shifts the window to the left half of the screen, which is a standard Win7 feature.


Ahh, I only have Win XP which doesn't have that feature. Sending the Win key still works in XP at any rate.

My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


BXF
  • Members
  • 13 posts
  • Last active: Jul 31 2013 09:45 PM
  • Joined: 24 Jun 2013

Ahh, I only have Win XP which doesn't have that feature. Sending the Win key still works in XP at any rate.

Yes, that explains it.

 

I did mention that there were other problems. For example, I have a script that starts with:

 

    WinGetActiveTitle, OrigDir

    hwnd := WinExist("A")
    WinGet, process, processName, ahk_id %hwnd%

    for window in ComObjCreate("Shell.Application").Windows
        if (window.hwnd==hwnd)                                ; Case-sensitive comparison
            Break
              

 

Works fine with AHK 1.1.11.1, but with 1.1.11.2 I get some "Not enough storage" message (can't recall precise wording) on the ComObjCreate line.



Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

The only code change in v1.1.11.02 affects identification of controls within the script's Gui, and nothing else.  I suspect the cause lies elsewhere.  For instance, memory corruption can often cause seemingly inexplicable errors.



BXF
  • Members
  • 13 posts
  • Last active: Jul 31 2013 09:45 PM
  • Joined: 24 Jun 2013
✓  Best Answer

The only code change in v1.1.11.02 affects identification of controls within the script's Gui, and nothing else.  I suspect the cause lies elsewhere.  For instance, memory corruption can often cause seemingly inexplicable errors.

I don't wish to continue a big discussion about a minor issue, but just to summarize: after two previous attempts at 1.1.11.02, I tried it a third time, this time after first uninstalling 1.1.11.01, and all is well. There was an intervening reboot, though, so that may be the reason for the success.

 

Anyway, thanks for all contributions.



VxE
  • Moderators
  • 3622 posts
  • Last active: Dec 24 2015 02:21 AM
  • Joined: 07 Oct 2006
Just a thought in the dark: if another program on your computer uses a keyboard hook, AHK might change its sendmode to 'play', and that could interfere with sending the winkey.

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

VxE, nope.

 

 

However, since SendInput is unable to detect a low-level hook in programs other than AutoHotkey v1.0.43+, it will not revert in these cases, making it less reliable than SendPlay/Event.

 

"Less reliable" means keystrokes might be interspersed with what the user is typing on Windows XP or earlier.  As far as I can recall, my testing on the subject showed that it made no difference on Vista and 7; the "uninterruptibility" of SendInput seemed to only apply to XP/2k.

 

Of course, any program with a keyboard hook could potentially interfere in some way, since the simulated and real keystrokes all pass through it.