Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Thu Dec 12, 2019 1:22 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Shift key not being held down
Thanked: 0 time(s)  Unread post Posted: Wed Nov 27, 2019 10:48 pm 
New User
New User



Joined: Wed Nov 06, 2019 6:36 pm
Posts: 12
Been thanked: 0 time(s)
Has thanked: 2 time(s)
Contribution Points: 21
The goal of this macro is to simply open a folder "working" containing images
Hold shift and press right "num" of times to highlight specific "num" of photos
Release shift , cut , and paste into another window "uploads"

Ive tried {<rshiftkey>} & {<shift>} which lead to nothing

Thanks in advance

Code:
function("move to uploads")
     begin
          Macro.Pause("1500")
          Window.Bring to front("Working", "Yes")
          Macro.Pause("200")
          Keyboard.Press key("{<right>}")
          Macro.Pause("200")
          Keyboard.Press key("{<right>}")
          Macro.Pause("200")
          Keyboard.Press key("{<home>}")
          Macro.Pause("200")
          Keyboard.Hold keys("{<lshiftkey>}")
          begin loop("{num}")
               Keyboard.Press key("{<right>}")
               Macro.Pause("150")
          end
          Keyboard.Release keys("{<lshiftkey>}")
          Macro.Pause("200")
          Clipboard.Cut()
          Macro.Pause("200")
          Window.Bring to front("Uploads", "Yes")
          Macro.Pause("200")
          Clipboard.Paste()
          Macro.Pause("200")
          Window.Bring to front("T1macro", "No")
          Macro.Pause("200")
          Keyboard.Press key("{<down>}")
          Macro.Pause("200")
          Keyboard.Press key("{<left>}")
          Macro.Pause("200")
          Keyboard.Press key("{<left>}")
          Clipboard.Copy()
          Window.Bring to front("FastStone Photo Resizer 4.3", "No")
          Macro.Pause("200")
          Mouse.Click at coordinate("1327", "109", "left")
          Macro.Pause("200")
          Mouse.Click at coordinate("1327", "150", "left")
          Macro.Pause("200")
          Keyboard.Press key("{<home>}")
     end
function


Top
 Profile  
Reply with quote  
 Post subject: Re: Shift key not being held down
Thanked: 0 time(s)  Unread post Posted: Thu Nov 28, 2019 12:19 am 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1970
Location: USA
Been thanked: 439 time(s)
Has thanked: 34 time(s)
Contribution Points: 16805
Yes it looks like the combination of shift + arrow doesn't work; I'll look into it further and see if I can get a definite answer as to why and if we can fix it.

In the meantime, you can still accomplish what you're trying to do by clicking on the first item and then holding shift while clicking on the last item to select those and everything in between. You don't really need math or variables to do it this way, just use investigator to get the coordinates.
Code:
 begin
     Mouse.Move to coordinate("358", "272")
     Macro.Pause("1000")
     Mouse.Click("left")
     Macro.Pause("100")
     Mouse.Move to coordinate("834", "290")
     Macro.Pause("1000")
     Keyboard.Hold keys("{<lshiftkey>}")
     Mouse.Click("left")
     Keyboard.Release keys("{<lshiftkey>}")
 end
Of course, if you're selecting everything in the folder it would be much easier to use ctrl+a to select all...so no need for any coordinates. But, I assume if you're "cutting" then you are only taking a portion at a time.

_________________
----------------------------------------Syrifina---------------------------------------------------
PM me for licenses and/or licensing information: Click Here
[Be sure to include and update your profile with your BE ID]

Forum Rules
Reminder of rules regarding Contribution points
Getting started in 1, 2, 3
Virtual Drivers; Manual Installers


Top
 Profile  
Reply with quote  
 Post subject: Re: Shift key not being held down
Thanked: 0 time(s)  Unread post Posted: Thu Nov 28, 2019 5:07 am 
New User
New User



Joined: Wed Nov 06, 2019 6:36 pm
Posts: 12
Been thanked: 0 time(s)
Has thanked: 2 time(s)
Contribution Points: 21
I think this might be the only way to do it because the "num" number of photos im cutting is varying. and that number is saved as a variable in the maCRo each time it detects it.


Top
 Profile  
Reply with quote  
 Post subject: Re: Shift key not being held down
Thanked: 0 time(s)  Unread post Posted: Thu Nov 28, 2019 3:03 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 1970
Location: USA
Been thanked: 439 time(s)
Has thanked: 34 time(s)
Contribution Points: 16805
You could still use variables if you want:
Code:
 begin
     Variable.Set("num", "3")
     Mouse.Move to coordinate("351", "262")
     Macro.Pause("1000")
     Mouse.Save coordinate to variable("x", "y")
     Mouse.Click("Left")
     Macro.Pause("100")
     begin loop("{num}")
          Variable.Add (Math)("x", "120")
     end
     Mouse.Move to coordinate("{x}", "{y}")
     Macro.Pause("1000")
     Keyboard.Hold keys("{<lshiftkey>}")
     Macro.Pause("100")
     Mouse.Click("Left")
     Keyboard.Release keys("{<lshiftkey>}")
 end
Where "num" is the number of photos and the "120" is the space between items in your folder.

_________________
----------------------------------------Syrifina---------------------------------------------------
PM me for licenses and/or licensing information: Click Here
[Be sure to include and update your profile with your BE ID]

Forum Rules
Reminder of rules regarding Contribution points
Getting started in 1, 2, 3
Virtual Drivers; Manual Installers


Top
 Profile  
Reply with quote  
 Post subject: Re: Shift key not being held down
Thanked: 0 time(s)  Unread post Posted: Fri Nov 29, 2019 6:00 pm 
New User
New User



Joined: Wed Nov 06, 2019 6:36 pm
Posts: 12
Been thanked: 0 time(s)
Has thanked: 2 time(s)
Contribution Points: 21
Thanks i was thinking about doing that, hopefully it'll be just as fast


Top
 Profile  
Reply with quote  
 Post subject: Re: Shift key not being held down
Thanked: 0 time(s)  Unread post Posted: Fri Nov 29, 2019 6:14 pm 
New User
New User



Joined: Wed Nov 06, 2019 6:36 pm
Posts: 12
Been thanked: 0 time(s)
Has thanked: 2 time(s)
Contribution Points: 21
works


Top
 Profile  
Reply with quote  
 Post subject: Re: Shift key not being held down
Thanked: 0 time(s)  Unread post Posted: Mon Dec 02, 2019 5:03 pm 
New User
New User



Joined: Wed Nov 06, 2019 6:36 pm
Posts: 12
Been thanked: 0 time(s)
Has thanked: 2 time(s)
Contribution Points: 21
@Syrifina

Is there any way this Shift hold problem will be fixed?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group