Vision Posted January 3, 2007 Share Posted January 3, 2007 hi, how i can do this for 2 actions ? what i will: never ending loop what says: if Winactive "Session 1 [22x11]" do if MouseWheel ("up", 1) than send ("{PGUP}") if MouseWheel ("down", 1) than send ("{PGDN}") is that possible ? regards vision Link to comment Share on other sites More sharing options...
James Posted January 3, 2007 Share Posted January 3, 2007 While 1 If MouseWheel("up") Then Send("{PgUP}") EndIf If MouseWheel("down") Then Send("{Pgup}") WEnd Secure Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Vision Posted January 3, 2007 Author Share Posted January 3, 2007 (edited) hi thanks for fast answer : Error: "Wend" statement with no matching "while" statement. when i start the script when i add a EndIf in the first if parse the he send permanently pageup, non stop ! and is it not possible to add a winactive title action ? regards vision Edited January 3, 2007 by Vision Link to comment Share on other sites More sharing options...
James Posted January 3, 2007 Share Posted January 3, 2007 Sorry I forgot that Window Part. And I forgot to add a EndIF Func Mouse() If MouseWheel("up") Then Send("{PgUP}") EndIf If MouseWheel("down") Then Send("{Pgup}") EndIf EndFunc While 1 If WinActive("Session 1 [22x11]") Then Mouse() EndIf WEnd Secure Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Vision Posted January 3, 2007 Author Share Posted January 3, 2007 hmm thanks but when i stat this script its press permanently Page up /page down without to hit the mouse wheel... regards vision Link to comment Share on other sites More sharing options...
Helge Posted January 3, 2007 Share Posted January 3, 2007 (edited) Description for MouseWheel says "Moves the mouse wheel up or down". Doesn't say anything aboutchecking, so instead boot up your helpfile and search for "_IsPressed". Should get you on your way.EDIT : Looks like mousewheel isn't mentioned on that list..oopsie. Well, you could use GUIRegisterMsgand $WM_MOUSEWHEEL, but I would find it weird if it's not possible to trigger mousewheel using theIsPressed-method. Edited January 3, 2007 by Helge Link to comment Share on other sites More sharing options...
James Posted January 3, 2007 Share Posted January 3, 2007 Oh, yeah, I messed it up. Sorry. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Vision Posted January 3, 2007 Author Share Posted January 3, 2007 ohw i see it now too ^^ it seems thats harder that i think, so anybody can code this ? with GUIRegisterMsg and $ WM_MOUSEWHEEL ??? regards vision Link to comment Share on other sites More sharing options...
James Posted January 3, 2007 Share Posted January 3, 2007 How about you try using the search function? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Helge Posted January 3, 2007 Share Posted January 3, 2007 it seems thats harder that i think, so anybody can code this ? with GUIRegisterMsg and $ WM_MOUSEWHEEL ???I have to run like the wind, but here are some bits and pieces : Global Const $WM_MOUSEWHEEL = 0x020A ;... GUIRegisterMsg($WM_MOUSEWHEEL, "MY_WM_MOUSEWHEEL") ;... Func MY_WM_MOUSEWHEEL($hWnd, $Msg, $wParam, $lParam) Local $state = BitShift($wParam, 16) ; -120 is up, 120 is down EndFunc Link to comment Share on other sites More sharing options...
James Posted January 3, 2007 Share Posted January 3, 2007 That seems a better way to me. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Vision Posted January 4, 2007 Author Share Posted January 4, 2007 hmm okay i tried this but it not works Global Const $WM_MOUSEWHEEL = 0x020A ;... GUIRegisterMsg($WM_MOUSEWHEEL, "MY_WM_MOUSEWHEEL") ;... Func MY_WM_MOUSEWHEEL($hWnd, $Msg, $wParam, $lParam) Local $state = BitShift($wParam, 16) ; -120 is up, 120 is down EndFunc while 1 If $WM_MOUSEWHEEL = -120 Then Send("{PgUP}") EndIf If $WM_MOUSEWHEEL = 120 Then Send("{Pgup}") EndIf wend Link to comment Share on other sites More sharing options...
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