Jump to content
Macro Express Forums



Recommended Posts

I have posted this message at a bunch of different places and just can't seem to find a response. Thought I would post here and hope for the best...


Everybody says Photoshop can DO.


I say sure!?!?


1. I want to rotate a cocked page when I do a clip.

2. I never know the exact percentage or degree of rotation, that’s strictly a guess.

3. What I do know is usually some kind of a straight line or edge in picture.

a. Good example would be a scan of a book’s front page. It usually has a “title” that is horizontal to the page. This is my starting point.




1. If I draw a line horizontal to the “title”, and can execute crop I have my solution providing the program knows that that line is the horizontal of my picture.

2. Here’s my way of thinking for this. If I can draw the line as I indicated above and hit enter and it goes horizontal that’s good. But some Photo program is going to take it to the next step. And I hope it’s you. Two buttons that can interact with that horizontal line.

a. Horizontal button would rotate the page whereas your line would end up horizontal.

b. A vertical button would rotate the page where your line is vertical or perpendicular.


Bottom line a photo editing program that has a crop tool that can crop based on a line you draw over your picture that can go vertical or horizontal. It would automatically line the picture up to be perfectly horizontal or vertical.


I hope this explains to you what my needs are. Do you have a work around for what I’m trying to do? I do have macro capabilities with Macro Express.




Trying to do the rotation by degrees is like trying to spread butter on bread on a baked potato with a hot fork. You know if nobody else has this and it’s something new it would be like a shoe manufacturer making shoes with no way to hold them on and someone coming around and saying hey why don’t we use laces on those.




You have a page from a book that you scanned and it is maybe

> 10-15 degrees off from being straight. In other words the picture is

> cocked. Then on that page you have a title and that title is 'This Is

> the Story of Computers.' What you would do is draw a line under 'This

> Is the Story of Computers', clicking A (horizontal) would cause that

> page to rotate to a perfect picture view. If you click B (vertical)

> that page would rotate to a perfect landscape view; in this case that

> would be an undesirable choice. But in some cases that would be a

> desirable value.

Link to comment
Share on other sites

We've used PaperPort a lot over the years.

Visioneer Click Products, 3rd Party Software.

There was a feature that you could use to align by clicking on one portion of the document, drag and release or click again. It may also auto rotate.

Here's some code I threw together to execute such a feature.

Prompt the user for the number of times to rotate clockwise and rotate it.


<REM2:Prompt user:  Rotate clockwise how many times?><IVAR2:01:02:FRotate clockwise how many times?TTCenter:Center><REM2:Execute rotation N1 times.><REP3:05:000001:000001:0001:0:01:><REM2:Keyboard Shortcut><CTRLD><TEXTTYPE:r><CTRLU><REM2:OR><REM2:Click button.><MMW2:100,100><LCLK><REM2:Delay between rotations.><MSD:0300><ENDREP><REM2:Execute alignment feature.><REM2:Keyboard Shortcut><CTRLD><TEXTTYPE:i><CTRLU><REM2:OR><REM2:Click button.><MMW2:150,100><LCLK><REM2:Delay.><MSD:0300><REM2:Go near beginning of title.><MMW2:250,250><REM2:Click button down.><LDN><REM2:Go near end of title.><MMW2:450,250><REM2:User to click and release left button up.>

    // Prompt user:  Rotate clockwise how many times?

    Variable Set Integer %N1% from Prompt

    // Execute rotation N1 times.

    Repeat with Variable using %N1%

      // Keyboard Shortcut

      Control Key Down

      Text Type: r

      Control Key Up

      // OR

      // Click button.

      Mouse Move Window 100, 100

      Mouse Left Button Click

      // Delay between rotations.

      Delay 300 Milliseconds

    Repeat End

    // Execute alignment feature.

    // Keyboard Shortcut

    Control Key Down

      Text Type: i

    Control Key Up

    // OR

    // Click button.

    Mouse Move Window 150, 100

    Mouse Left Button Click

    // Delay.

    Delay 300 Milliseconds

    // Go near beginning of title.

    Mouse Move Window 250, 250

    // Click button down.

    Mouse Left Button Down

      // Go near end of title.

      Mouse Move Window 450, 250

      // User to click and release left button up.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...