- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
MouseMoveT o help
[ Edited ]
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-18-2011 08:29 PM - edited 03-18-2011 10:20 PM
Hey all, I am trying to set up a script that runs when I press G4. This is what I have exactly;
function OnEvent(event, arg)
if (event == "G_PRESSED" and arg == 4) then
MoveMouseTo(52114, 13665)
Sleep(500)
PressAndReleaseMouseButton(2)
Sleep(500)
MoveMouseTo(45442, 18799)
Sleep(500)
PressAndReleaseMouseButton(1)
I am having a few problems. I don't know if this matters but the "script" is assigned to the G4 key (like you would assign a macro to a key)
Anyway,
1. It hangs at the first MoveMouseTo event and doesn't execute the command, it doesn't even move to the location.
2. When I save and then switch to the program the script is for it attempts to run the script before I even press G4 (but still fails at the first MoveMouseTo.
Any help? If you need more info please let me know.
Forgot to metion this is for the g510
Solved! Go to Solution.
Re: MouseMoveT o help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-18-2011 09:16 PM
Can you post the full script?
What you currently have wouldn't run. There is no end at the end of the if then statement nor one for the OnEvent function.
Re: MouseMoveT o help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-18-2011 09:27 PM
Ok, the no "end" on the two was my first problem. The remaining problem is that when I save from the editor and then alt-talb into the program, or click on the program in the background to switch to it, the script will run instantly upon switching to the program without me pressing G4 to start it, and G4 key is what i have the script bound to. this is the new full script, copied everything
function OnEvent(event, arg)
end
if (event == "G_PRESSED" and arg == 4) then
end
MoveMouseTo(52114, 13665)
Sleep(500)
PressAndReleaseMouseButton(2)
Sleep(500)
MoveMouseTo(45442, 18799)
Sleep(500)
PressAndReleaseMouseButton(1)
Re: MouseMoveT o help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-18-2011 10:09 PM
you probably want this:
function OnEvent(event, arg)
if (event == "G_PRESSED" and arg == 4) then
MoveMouseTo(52114, 13665)
Sleep(500)
PressAndReleaseMouseButton(2)
Sleep(500)
MoveMouseTo(45442, 18799)
Sleep(500)
PressAndReleaseMouseButton(1)
end
end
-ken
I do not work for Logitech. I'm just a user.
Re: MouseMoveT o help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-18-2011 10:12 PM
Ya, that's what I was talking about.
Re: MouseMoveT o help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
03-18-2011 10:19 PM
Exactly what i needed, thanks ![]()
Re: MouseMoveT o help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-14-2012 06:48 PM
Makes me sad when i realized this can't be done for G700 now
Re: MouseMoveT o help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-14-2012 07:25 PM
Baramon wrote:Makes me sad when i realized this can't be done for G700 now
Why not?
Re: MouseMoveT o help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-14-2012 07:29 PM
G700 isn't supported in LGS yet. supposedly LGS 8.40 will add it (along with G9, G9x and a few others also).
-ken
I do not work for Logitech. I'm just a user.
Re: MouseMoveT o help
[ Edited ]
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-27-2012 09:34 AM - edited 10-27-2012 09:36 AM
It is possible still, although at the time I thought the G700 supported the LGS. It requires a bit more work and I have a script setup that will do it rather easily.
http://www.logitechusers.com/game-profiles-macros-
You'll notice that it looks a lot like the format kgober showed us once, but with added functionality.
Given your level of coding, it may be beyond your ability.
