AutoHotkey Community

It is currently May 27th, 2012, 5:02 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Multiply by 2/3
PostPosted: April 26th, 2010, 11:36 pm 
Offline

Joined: October 25th, 2009, 6:10 pm
Posts: 17
I'm not positive, but I think that you want to multiply the last set by 2/3.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Multiply by 2/3
PostPosted: April 27th, 2010, 12:42 am 
Offline

Joined: November 22nd, 2009, 1:54 am
Posts: 28
gunns256 wrote:
I'm not positive, but I think that you want to multiply the last set by 2/3.

As I am just really guessing, could you please type out what lines you think I should change with the errors in it removed and your corrections in their place?

Thanks


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 27th, 2010, 12:52 am 
Please can you post your code inside
Code:
[code] code tags [/code]
tags? You can do this by selecting your code and pressing the "Code" button just above the box where you write your post.

It makes it much easier for people to see what is going on :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 27th, 2010, 1:23 am 
Offline

Joined: November 22nd, 2009, 1:54 am
Posts: 28
Anonymous wrote:
Please can you post your code inside
Code:
[code] code tags [/code]
tags? You can do this by selecting your code and pressing the "Code" button just above the box where you write your post.

It makes it much easier for people to see what is going on :)

I forgot how I did the first one so all I did was make a copy of the original and then edit it and save under a different name.

I gave the code above I used?

Can't you just correct that for me please?

Thanks


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Code
PostPosted: April 27th, 2010, 9:53 am 
Offline

Joined: November 22nd, 2009, 1:54 am
Posts: 28
Code:
 Loop, 4 {
    Run, iexplore.exe, ,Max
}
Sleep, 5000
Run, msimn.exe, ,Min
Run, C:\Program Files\WordWeb\wwnotray.exe, ,Min
Run, C:\sm_bible\smw.exe,C:\sm_bible, ,Min
Run, C:\program files\Commander\efcw.exe, ,Min
; Run, C:\pod\pod.exe, C:\pod\,Min
Run, C:\Program Files\NET Bible First Edition\netbible.chm, ,Min
Run, C:\Documents and Settings\All Users\Start Menu\Programs\Microsoft Office\Microsoft FrontPage, ,Min
Sleep, 5000
Loop, 4 {
    Run, explorer.exe /n`,C:\scriptural_data,,
    Sleep, 2000
    WinMove, scriptural_data,,0, 0, % A_ScreenWidth / 3
    Run, explorer.exe /n`,F:\scriptural_data,,
    Sleep, 2000
    WinMove, scriptural_data,,% A_ScreenWidth / 3, 0, % A_ScreenWidth / 3
    Run, explorer.exe /n`,G:\scriptural_data,,
    Sleep, 2000
    WinMove, scriptural_data,,% A_ScreenWidth / 3, 0, % A_ScreenWidth / 3
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 27th, 2010, 10:41 am 
Offline

Joined: October 15th, 2007, 3:10 pm
Posts: 790
Location: England
What do you actually want in each section of the screen? Please clarify which window you want in each third of the screen, then we can help.

If you want to move a window to the "right side" third of the screen, do something like the following:

Code:
WinMove, scriptural_data,,% (A_ScreenWidth / 3) * 2, 0, % A_ScreenWidth / 3 ; 1/3 of the screen * 2 = 2/3


Or alternatively:
Code:
WinMove, scriptural_data,,% A_ScreenWidth - (A_ScreenWidth / 3), 0, % A_ScreenWidth / 3 ; full screen width - 1/3 = 2/3


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 27th, 2010, 10:56 am 
Offline

Joined: November 22nd, 2009, 1:54 am
Posts: 28
OceanMachine wrote:
What do you actually want in each section of the screen? Please clarify which window you want in each third of the screen, then we can help.

Thanks,

All I want is 12 instances (4 x 3) of the Directories 'scriptural_data ' spread across the screen in 3 lots each 1/3rd of the screen wide.

So the screen would look like -

Left Hand 1/3rd of screen = C:\ 4 x scriptural_data windows
Middle 1/3rd of screen = F:\ 4 x scriptural_data windows
Right Hand Side of screen = G:\ 4 x scriptural_data windows.

(C:, F:, G: = my drives)

I presume that if I later wanted sub folders within scriptural_data directory I would change to say e.g. C:\scriptural_data\nephilim so the sub-folder ' nephillim ' would open automatically. Is that correct?

Ultimately therefore I would like to dictate what sub-folders I want across the screen e.g. -

Left Hand 1/3rd of screen = C:\ 1 x scriptural_data\nephilim window
Left Hand 1/3rd of screen = C:\ 1 x scriptural_data\reasonable_faith window
Left Hand 1/3rd of screen = C:\ 1 x scriptural_data\theologyweb window
Left Hand 1/3rd of screen = C:\ 1 x scriptural_data\yuku window


Middle 1/3rd of screen = F:\ 1 x scriptural_data\nephilim window
Middle 1/3rd of screen = F:\ 1 x scriptural_data\reasonable_faith window
Middle 1/3rd of screen = F:\ 1 x scriptural_data\theologyweb window
Middle 1/3rd of screen = F:\ 1 x scriptural_data\yuku window


Right Hand 1/3rd of screen = G:\ 1 x scriptural_data/nephilim window
Right Hand 1/3rd of screen = G:\ 1 x scriptural_data\reasonable_faith window
Right Hand 1/3rd of screen = G:\ 1 x scriptural_data\theologyweb window
Right Hand 1/3rd of screen = G:\ 1 x scriptural_data\yuku window


Many thanks for your kind help.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 27th, 2010, 1:36 pm 
Offline

Joined: October 15th, 2007, 3:10 pm
Posts: 790
Location: England
Sorry I edited my original post, probably while you were posting a reply. Did you see what I put?

OceanMachine wrote:
If you want to move a window to the "right side" third of the screen, do something like the following:

Code:
WinMove, scriptural_data,,% (A_ScreenWidth / 3) * 2, 0, % A_ScreenWidth / 3 ; 1/3 of the screen * 2 = 2/3


Or alternatively:
Code:
WinMove, scriptural_data,,% A_ScreenWidth - (A_ScreenWidth / 3), 0, % A_ScreenWidth / 3 ; full screen width - 1/3 = 2/3


I have absolutely no idea why you would want so many Explorer windows open... especially 3 copies of each showing the same folder... It seems like a very inefficient way of doing whatever it is you want to do with this code.

If you feel like it, try to explain why you want these windows, and exactly what kind of thing you are trying to do, and we will probably be able to show you a *much* easier way of doing it...


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Help?
PostPosted: April 28th, 2010, 12:25 am 
Offline

Joined: November 22nd, 2009, 1:54 am
Posts: 28
Thanks again for your patience

1. I don't undertand where in the Code i gave where I insert your bit of Code?


2. I want to back up files in folders I use daily on my F: & G: drives so I have 3 copies in case of drive crashes.

The typical folders I use daily were as I laid out -

Left Hand 1/3rd of screen = C:\ 1 x scriptural_data\nephilim window
Left Hand 1/3rd of screen = C:\ 1 x scriptural_data\reasonable_faith window
Left Hand 1/3rd of screen = C:\ 1 x scriptural_data\theologyweb window
Left Hand 1/3rd of screen = C:\ 1 x scriptural_data\yuku window


Middle 1/3rd of screen = F:\ 1 x scriptural_data\nephilim window
Middle 1/3rd of screen = F:\ 1 x scriptural_data\reasonable_faith window
Middle 1/3rd of screen = F:\ 1 x scriptural_data\theologyweb window
Middle 1/3rd of screen = F:\ 1 x scriptural_data\yuku window


Right Hand 1/3rd of screen = G:\ 1 x scriptural_data/nephilim window
Right Hand 1/3rd of screen = G:\ 1 x scriptural_data\reasonable_faith window
Right Hand 1/3rd of screen = G:\ 1 x scriptural_data\theologyweb window
Right Hand 1/3rd of screen = G:\ 1 x scriptural_data\yuku window

I can't think of any other way but IF you can that would be wonderful thanks

Many thanks


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2010, 2:56 am 
Online

Joined: April 8th, 2009, 7:49 pm
Posts: 6073
Location: San Diego, California
In your vision of splitting the screen into thirds, all of the windows widths would be A_ScreenWidth/3.

There will be 3 different left-hand edges at 0/3, 1/3 and 2/3 of the screen width.
0/3 =>0
1/3 => A_ScreenWidth/3
2/3 => A_ScreenWidth *2/3

I took the last script you posted sometime early AM (Pacific) Posted: Tue Apr 27, 2010
Here is your script, corrected.
Code:
 Loop, 4 {
    Run, iexplore.exe, ,Max
}
Sleep, 5000
Run, msimn.exe, ,Min
Run, C:\Program Files\WordWeb\wwnotray.exe, ,Min
Run, C:\sm_bible\smw.exe,C:\sm_bible, ,Min
Run, C:\program files\Commander\efcw.exe, ,Min
; Run, C:\pod\pod.exe, C:\pod\,Min
Run, C:\Program Files\NET Bible First Edition\netbible.chm, ,Min
Run, C:\Documents and Settings\All Users\Start Menu\Programs\Microsoft Office\Microsoft FrontPage, ,Min
Sleep, 5000
Loop, 4 {
    Run, explorer.exe /n`,C:\scriptural_data,,
    Sleep, 2000
    WinMove, scriptural_data,,0, 0, A_ScreenWidth /3
    Run, explorer.exe /n`,F:\scriptural_data,,
    Sleep, 2000
    WinMove, scriptural_data,, A_ScreenWidth /3, 0, A_ScreenWidth/3
    Run, explorer.exe /n`,G:\scriptural_data,,
    Sleep, 2000
    WinMove, scriptural_data,,% A_ScreenWidth *2/3, 0, % A_ScreenWidth/3
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Thanks
PostPosted: April 28th, 2010, 4:07 am 
Offline

Joined: November 22nd, 2009, 1:54 am
Posts: 28
That seems to be working fine!

Many thanks again, much appreciated.

Thank you


Report this post
Top
 Profile  
Reply with quote  
 Post subject: 2nd Computer
PostPosted: April 28th, 2010, 6:48 am 
Offline

Joined: November 22nd, 2009, 1:54 am
Posts: 28
Now my 2nd computer I would like -

Split in to 4 across screen each 1/4 of screen

I have tried to guess but only limited success -
Code:
Loop, 4 {
    Run, explorer.exe /n`,C:\m,,
    Sleep, 2000
    WinMove, m,,0, 0, A_ScreenWidth /4
    Run, explorer.exe /n`,D:\,,
    Sleep, 2000
    WinMove, D:\,,0, 0, A_ScreenWidth /2
    Run, explorer.exe /n`,F:\G_drive_backup\m,,
    Sleep, 2000
    WinMove, G_drive_backup\m,, A_ScreenWidth /3, 0, A_ScreenWidth/4
    Run, explorer.exe /n`,G:\m,,
    Sleep, 2000
    WinMove, m,,% A_ScreenWidth *4/4, 0, % A_ScreenWidth/4
}


That would set me up nicely if you can make it work please?

Thanks a million for your patience


Last edited by Composer on April 28th, 2010, 1:06 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2010, 12:41 pm 
Online

Joined: April 8th, 2009, 7:49 pm
Posts: 6073
Location: San Diego, California
PLEASE POST YOUR SCRIPT USING CODE TAGS! IS THAT CLEAR?

I corrected you last script and you liked the result; but you did not learn from that reply :roll:

Let me try it a different way: here is the explanation -- the thought process

If all windows are to be the same width, then it follows that all should have the same "width" parameter. Does this make sense :?:

Also, the x parameter would follow a natural progression
A_ScreenWidth *0/4 ; this is the left edge of the screen
A_ScreenWidth *1/4
A_ScreenWidth *2/4
A_ScreenWidth *3/4
A_ScreenWidth *4/4 ; this is the right edge of the screen !! Don't use this unless you have more than one screen


Please look at the winmove command and the way you are filling the parameters
Code:
WinMove, WinTitle, WinText, X, Y , Width           , Height, ExcludeTitle, ExcludeText
WinMove, D:\,             , 0, 0, A_ScreenWidth /2 ,       ,             ,

all width parameters should be the same width , one of yours is not!!
WinMove, D:\,             , 0, 0, A_ScreenWidth /2 ,       ,             ,


X parameters should be fractions based on the width , at least one of yours is not!!
WinMove, D:\,             , 0, 0, A_ScreenWidth /2 ,       ,             ,


Please carefully correct your script and try again


Report this post
Top
 Profile  
Reply with quote  
 Post subject: I'm lost?
PostPosted: April 28th, 2010, 1:30 pm 
Offline

Joined: November 22nd, 2009, 1:54 am
Posts: 28
I tried many combinations on my other computer.

I am lost and not getting it.

This is about my third time in my life I have ever tried to write this type of code. All attempts have been at this forum only.

It is not something I intend doing regularly. I simply want to get two Codes that will enable me to get on with what I really want to do.

Thanks


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2010, 1:49 pm 
Online

Joined: April 8th, 2009, 7:49 pm
Posts: 6073
Location: San Diego, California
Here is your 4 across script, corrected.
I only changed the two parameters I mentioned in my prior post.

[untested]
Code:
Loop, 4 {
    Run, explorer.exe /n`,C:\m,,
    Sleep, 2000
    WinMove, m,,0, 0, A_ScreenWidth /4
    Run, explorer.exe /n`,D:\,,
    Sleep, 2000
    WinMove, D:\,,A_ScreenWidth /4, 0, A_ScreenWidth /4
    Run, explorer.exe /n`,F:\G_drive_backup\m,,
    Sleep, 2000
    WinMove, G_drive_backup\m,, A_ScreenWidth *2/4, 0, A_ScreenWidth/4
    Run, explorer.exe /n`,G:\m,,
    Sleep, 2000
    WinMove, m,,% A_ScreenWidth *3/4, 0, A_ScreenWidth/4
}


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 79 guests


You can 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

Search for:
Powered by phpBB® Forum Software © phpBB Group