spaccount Posted February 25, 2015 Posted February 25, 2015 (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 February 25, 2015 by spaccount
spaccount Posted February 25, 2015 Author Posted February 25, 2015 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+`"
bogQ Posted February 25, 2015 Posted February 25, 2015 (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 ;==>_flip3dedit:code cleanup of unnedded loop Edited February 25, 2015 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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.
Gianni Posted February 25, 2015 Posted February 25, 2015 Maybe like >this ? >this is funny too... Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
spaccount Posted February 25, 2015 Author Posted February 25, 2015 (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 February 25, 2015 by spaccount
Solution bogQ Posted February 25, 2015 Solution Posted February 25, 2015 (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 #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 February 25, 2015 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now