spaccount

Alt+~ to invoke Flip3d

7 posts in this topic

#1 ·  Posted (edited)

Noobie here!
 
I'm trying to map ALT+` to use the Flip3d view(Win+Tab).
 
I'm able to call it using the following script:
 
Func _flip3d()
    Send("#{Tab}")
EndFunc
 
HotKeySet("!{`}","_flip3d")
 
While 1
    sleep(10)
WEnd

 
 
However, this just launches the Flip3d view for a second and quits it.
 
I need it to exactly map like ALT+TAB or WIN+TAB.
I know that means, I need to use ALTDOWN etc, but haven't been able to figure it out.
I'm sure someone has done this before, but google didn't find anything for me :(
 
Any help would be awesome! :)

Edited by spaccount

Share this post


Link to post
Share on other sites



OK.. I got it to launch and stay on the screen with this:

 
Func _flip3d()
ShellExecute("rundll32.exe","DwmApi #105")
EndFunc
 
HotKeySet("!{`}","_flip3d")
 
While 1
    sleep(10)
 WEnd
 
Still now clue about how I "tab" through the windows using "ALT+`"

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

maybe something like this can help?

 

#include <Misc.au3>
HotKeySet('!{`}', '_flip3d')

While 1
    Sleep(100)
WEnd


Func _flip3d()
    Local $ftime = False
    Send('{LWINDOWN}')
    Do
        Send('{TAB}')
        If $ftime = False Then
            $ftime = True
            Sleep(400)
        EndIf
        Sleep(150)
    Until Not _IsPressed('C0') Or Not _IsPressed('12')
    Send('{LWINUP}')
EndFunc   ;==>_flip3d
edit:code cleanup of unnedded loop Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Maybe like >this ?

>this is funny too... :)


small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

maybe something like this can help?

 

#include <Misc.au3>
HotKeySet('!{`}', '_flip3d')

While 1
    Sleep(100)
WEnd


Func _flip3d()
    Local $ftime = False
    Send('{LWINDOWN}')
    Do
        Send('{TAB}')
        If $ftime = False Then
            $ftime = True
            Sleep(400)
        EndIf
        Sleep(150)
    Until Not _IsPressed('C0') Or Not _IsPressed('12')
    Send('{LWINUP}')
EndFunc   ;==>_flip3d
edit:code cleanup of unnedded loop

 

 

thanks for the quick response! :)

this almost gets me there..

the one thing missing is that it exits the function if i lift the "`" key while still holding "ALT" down.

typical use case for flip3d is similar to alt+tab, i.e. you keep "ALT/WIN" held down but press "`" to switch between windows.

 

I can change 

Until Not _IsPressed('C0') Or Not _IsPressed('12')

to 

Until Not _IsPressed('12')

 

However,

then I need a condition to send the "Tab". Any ideas?

Using "_IsPressed('CO') to send "Tab" is less than ideal, as the UI will respond based on sleep vs actual input.

 

----------Update:

I found @HotKeyPressed. Perhaps I can use this somehow to trigger the same function or as a condition?

Edited by spaccount

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Using "_IsPressed('CO') to send "Tab" is less than ideal, as the UI will respond based on sleep vs actual input.

well you can try {tab down} but i dont know will it work :)

 

as for your first problem [the one thing missing is that it exits the function if i lift the "`" key while still holding "ALT" down.]

think this should solve it :P

#include <Misc.au3>
HotKeySet('!{`}', '_flip3d')

While 1
    Sleep(100)
WEnd


Func _flip3d()
    Send('{LWINDOWN}')
    Do
        Local $ftime = False
        Do
            Send('{TAB}')
            If $ftime = False Then
                $ftime = True
                Sleep(400)
            EndIf
            Sleep(150)
        Until Not _IsPressed('C0') Or Not _IsPressed('12')
        If Not _IsPressed('C0') And Not _IsPressed('12') ExitLoop 1
        Do
            Sleep(150)
        Until Not _IsPressed('12') Or _IsPressed('C0')
    Until Not _IsPressed('C0') And Not _IsPressed('12')
    Send('{LWINUP}')
EndFunc   ;==>_flip3d
Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now