OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-12-2010, 20:57
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 430
Default X5 Sendkeys and Windows 7

I have a set of macros to move objects around by their width or height. I tied these to the alt and arrow keys. However, this displaced the pan function so for panning I use crtl+alt+arrow key. I have some code that will send the pan command if no object is selected. Here's the code for moving right:

Code:
Sub moveRight()

    ActiveDocument.ReferencePoint = cdrCenter
    ActiveDocument.Unit = cdrMillimeter

    If ActiveDocument Is Nothing Then Exit Sub
    
    If ActiveSelection.Shapes.Count = 0 Then
    
        SendKeys "^%{right 4}", True
        Exit Sub
        
    End If

    x = ActiveSelection.Shapes(1).SizeWidth
    ActiveSelection.Move x, 0

End Sub
This code worked fine with XP. However I'm now using Windows 7 64 bit and when I try to run it I'm getting run-time error 70, permission denied. I switched off anti-virus etc to see if that was causing the problem, but it wasn't. So my long-winded question is how to make sendkeys work with X5 vba on Windows 7 64 bit. Thanks!

Chris
Reply With Quote
  #2  
Old 05-12-2010, 21:30
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
Try disabling UAC as a test.
-John
Reply With Quote
  #3  
Old 05-12-2010, 21:36
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default SendKeys

You can also give this a look:

http://vb.mvps.org/samples/SendInput/


-Shelby
Reply With Quote
  #4  
Old 05-12-2010, 23:35
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 430
Default

Quote:
Originally Posted by runflacruiser View Post
Hi.
Try disabling UAC as a test.
-John
No error message with UAC on default setting using my Admin account. .But an error when using my Standard User Account. Maximum security setting causes an error with my Admin account so it is pretty clear that UAC is the culprit. However I'm loathe to disable it completely. Any alternatives?

Thanks,

Chris
Reply With Quote
  #5  
Old 05-12-2010, 23:37
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 430
Default

Quote:
Originally Posted by shelbym View Post
You can also give this a look:

http://vb.mvps.org/samples/SendInput/


-Shelby
Thanks Shelby, I looked at that page but not sure what to do to incorporate the ideas there.

Chris
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Had to reinstall Windows lately sallybode General 0 07-10-2010 18:45
fit text to curve in a windows app dlpfis CorelDRAW/Corel DESIGNER VBA 5 17-09-2010 05:00
Sendkeys Test with CD12 knowbodynow CorelDRAW/Corel DESIGNER VBA 1 18-06-2010 09:47
Dismissing info windows via VBA ddonnahoe CorelDRAW/Corel DESIGNER VBA 2 03-02-2006 13:40
SendKeys Lev CorelDRAW/Corel DESIGNER VBA 2 17-02-2004 11:27


All times are GMT -5. The time now is 16:13.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com