Skip to content

Windows scroll #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2015
Merged

Windows scroll #50

merged 1 commit into from
Sep 19, 2015

Conversation

Deltatiger
Copy link
Collaborator

Added the windows part of the mouse scroll. Tested the basics and it works. The Mac and Linux parts need to be added and tested.

Check the feature and tell me if any changes are to be made.

@octalmage
Copy link
Owner

Fantastic thanks! I'll try to take a look tonight.

@Deltatiger
Copy link
Collaborator Author

Should I also create a function for scrollMouseSmooth ? Just like the one for moveMouseSmooth ?

@octalmage
Copy link
Owner

eh not yet. I'm going to work on this now.

@octalmage
Copy link
Owner

Got Mac support in ded851c, I guess you should merge this into your fork?

@octalmage
Copy link
Owner

Also could we use this syntax:

robot.scrollMouse(20, "up");
robot.scrollMouse(20, "down");

I'll start on the Linux support now.

@Deltatiger
Copy link
Collaborator Author

Ok I will change it to the new format and then send a PR. Everything could be merged after that.

@octalmage
Copy link
Owner

Thanks a ton! Would you be interested in being the official Windows maintainer? I'm not sure what that means, but you'd at least be an official collaborator.

@octalmage
Copy link
Owner

Got scrollMouse implemented for Linux! Updated my branch.

MMMouseWheelDirection is the same for all OSes, should we move it outside the conditionals?

@Deltatiger
Copy link
Collaborator Author

Yes the MMMouseWheelDirection can be moved out of the conditionals. I think this should be done once that part is done. You can merge it with your main stream.

@octalmage octalmage merged commit 828742e into octalmage:master Sep 19, 2015
@octalmage
Copy link
Owner

This code is actually giving me some issues on Windows XP:

gyp info spawn args   '/p:Configuration=Release;Platform=Win32' ]
  robotjs.cc
s:\documents\apps\robotjs\src\os.h(26): warning C4005: 'STRICT' : macro redefin
ition [S:\Documents\Apps\robotjs\build\robotjs.vcxproj]
          C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\windef.h(16) :
  see previous definition of 'STRICT'
  deadbeef_rand.c
  mouse.c
..\src\mouse.c(220): error C2275: 'INPUT' : illegal use of this type as an expr
ession [S:\Documents\Apps\robotjs\build\robotjs.vcxproj]
          C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\winuser.h(5341)
   : see declaration of 'INPUT'
..\src\mouse.c(220): error C2146: syntax error : missing ';' before identifier
'mouseScrollInput' [S:\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(220): error C2065: 'mouseScrollInput' : undeclared identifier [S
:\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(221): error C2065: 'mouseScrollInput' : undeclared identifier [S
:\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(221): error C2224: left of '.type' must have struct/union type [
S:\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(222): error C2065: 'mouseScrollInput' : undeclared identifier [S
:\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(222): error C2224: left of '.mi' must have struct/union type [S:
\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(223): error C2065: 'mouseScrollInput' : undeclared identifier [S
:\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(223): error C2224: left of '.mi' must have struct/union type [S:
\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(224): error C2065: 'mouseScrollInput' : undeclared identifier [S
:\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(224): error C2224: left of '.mi' must have struct/union type [S:
\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(225): error C2065: 'mouseScrollInput' : undeclared identifier [S
:\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(225): error C2224: left of '.mi' must have struct/union type [S:
\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(226): error C2065: 'mouseScrollInput' : undeclared identifier [S
:\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(226): error C2224: left of '.mi' must have struct/union type [S:
\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(227): error C2065: 'mouseScrollInput' : undeclared identifier [S
:\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(227): error C2224: left of '.mi' must have struct/union type [S:
\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(228): error C2065: 'mouseScrollInput' : undeclared identifier [S
:\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(228): warning C4133: 'function' : incompatible types - from 'int
 *' to 'LPINPUT' [S:\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(228): error C2065: 'mouseScrollInput' : undeclared identifier [S
:\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(275): warning C4244: '+=' : conversion from 'double' to 'size_t'
, possible loss of data [S:\Documents\Apps\robotjs\build\robotjs.vcxproj]
..\src\mouse.c(276): warning C4244: '+=' : conversion from 'double' to 'size_t'
, possible loss of data [S:\Documents\Apps\robotjs\build\robotjs.vcxproj]
  keypress.c
  keycode.c
  screen.c
  screengrab.c
  snprintf.c
..\src\snprintf.c(943): warning C4018: '>' : signed/unsigned mismatch [S:\Docum
ents\Apps\robotjs\build\robotjs.vcxproj]
..\src\snprintf.c(960): warning C4018: '>' : signed/unsigned mismatch [S:\Docum
ents\Apps\robotjs\build\robotjs.vcxproj]
..\src\snprintf.c(969): warning C4018: '>' : signed/unsigned mismatch [S:\Docum
ents\Apps\robotjs\build\robotjs.vcxproj]
..\src\snprintf.c(981): warning C4018: '>' : signed/unsigned mismatch [S:\Docum
ents\Apps\robotjs\build\robotjs.vcxproj]
..\src\snprintf.c(992): warning C4018: '>' : signed/unsigned mismatch [S:\Docum
ents\Apps\robotjs\build\robotjs.vcxproj]
  MMBitmap.c
gyp ERR! build error
gyp ERR! stack Error: `C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Documents and Settings\Administrat
or\Application Data\npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 5.1.2600
gyp ERR! command "node" "C:\\Documents and Settings\\Administrator\\Application
Data\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd S:\Documents\Apps\robotjs
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok

I'm looking into it, but I thought I tested this code already. Did I break something @Deltatiger?

@Deltatiger
Copy link
Collaborator Author

@octalmage Is this still causing problems ? If so I will look into it,

@octalmage
Copy link
Owner

@Deltatiger yeah I wasn't able to figure it out. I feel like an include or library might be missing but I'm not really sure.

@Deltatiger
Copy link
Collaborator Author

@octalmage Will look into it tonight

@Deltatiger
Copy link
Collaborator Author

@octalmage I am not getting any errors in Windows 7. I am currently on your master branch. Is this only happening in Win XP or does it occur everywhere ?

@octalmage
Copy link
Owner

I've only tested in Windows XP, I'll look into it some more later. What version of Visual Studio are you using? 


Jason StallingsSent from my iPhone

On Tue, Sep 22, 2015 at 10:37 AM, DeltaTiger notifications@github.com
wrote:

@octalmage I am not getting any errors in Windows 7. I am currently on your master branch. Is this only happening in Win XP or does it occur everywhere ?

Reply to this email directly or view it on GitHub:
#50 (comment)

@Deltatiger
Copy link
Collaborator Author

I am using Visual Studio 2013. Compiling via node-gyp build

@octalmage
Copy link
Owner

Hmm, I'm using Visual Studio 2008, I couldn't get 2013 on XP. I think I'm going to comment out the Windows code for now so I can release a new version, until I can figure out what's wrong.

@Deltatiger
Copy link
Collaborator Author

Ok I will also check it out on a VM

octalmage added a commit that referenced this pull request Oct 4, 2015
It doesn’t work on Windows XP. #50.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants