AutoHotkey Community

It is currently May 27th, 2012, 7:42 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 43 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: October 13th, 2004, 4:29 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
Ok gave it a try but not working . I added the stuff that has to be there to get the info from the registry so it now where to get the file from the users outlook mail folder .
Code:
IfExist, C:\WINDOWS\system32\ntimage.gif, SplashImage, C:\WINDOWS\system32\ntimage.gif, A,,, Copying
Progress, %a_index%, %a_loopfilename%, Installing..., Draft Installtion
RegRead, OutputVar, HKEY_CURRENT_USER, Identities, Last User ID
SourcePath = %OutputVar%
DestPath = C:\Documents and Settings\Candles\My Documents\my code projects\reg-backup\test
desired = Deleted Items.dbx\Drafts.dbx\Folders.dbx\Inbox.dbx\Offline.dbx\Outbox.dbx\Pop3uidl.dbx\saves.dbx\Sent Items.dbx\folders.avx
Loop, %OutputVar%\*.*
{
   IfNotInString, desired, %A_LoopFileName%
      Continue
   Else
   {
      FileCopy,%A_LoopFileFullPath%, %DestPath%\%A_LoopFileName%
      If A_Index = 100
         Break
      Progress, %a_index%, %a_loopfilename%, Installing..., Draft Installtion
      Sleep, 100 ;not necessary
   }
}

Just does a flash and then nothing .

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2004, 4:36 am 
Offline

Joined: October 12th, 2004, 11:34 pm
Posts: 74
Location: São Paulo ,Brazil
Works fine for me.
Since you will copy all files inside this folder you can remove the filename verification commands.
I still think that the Loop is not necessary.

edit:
you wrote SourcePath = %OutputVar%. is it correct??
I saw SourcePath = %USERPROFILE%\Local Settings\Application
Data\Identities\%OutputVar%\Microsoft\Outlook Express in another post


Last edited by Gre on October 13th, 2004, 4:43 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2004, 4:41 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
sent you a PM

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2004, 4:51 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
Ok this code right here I will post works and does what I want it to do and that is copy all the files from the users out look folder .
I just want to have the splash screen with bar work with this code ..
Code:
RegRead, OutputVar, HKEY_CURRENT_USER, Identities, Last User ID
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Deleted Items.dbx,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Drafts.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Folders.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Inbox.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Offline.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Outbox.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Pop3uidl.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\saves.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Sent Items.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\folders.avx ,%a_workingdir%

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2004, 4:56 am 
Offline

Joined: October 12th, 2004, 11:34 pm
Posts: 74
Location: São Paulo ,Brazil
progress values = 1 to 100
100/number of files = progress bar step,the bar will jump 10 times,it will not grow uniformly thir way


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2004, 4:59 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
Gre wrote:
progress values = 1 to 100
100/number of files = progress bar step,the bar will jump 10 times,it will not grow uniformly thir way


???? huh you lost me .

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2004, 5:03 am 
Offline

Joined: October 12th, 2004, 11:34 pm
Posts: 74
Location: São Paulo ,Brazil
Progress max value = 100
Number of files = 10
100/10 = 10

Progress, 10 after the first filecopy and 20 after the sec...100 after the last


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2004, 5:24 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
Not sure what you want me toi do ?

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2004, 5:36 am 
Offline

Joined: October 12th, 2004, 11:34 pm
Posts: 74
Location: São Paulo ,Brazil
Code:
/*
By BoBo
Here is a working example that demonstrates how a Progress window can be
overlayed on a SplashImage to make a professional looking Installer screen:
*/
IfExist, C:\WINDOWS\system32\ntimage.gif, SplashImage, C:\WINDOWS\system32\ntimage.gif, A,,, Copying
Progress, %a_index%, %a_loopfilename%, Installing..., Draft Installtion
RegRead, OutputVar, HKEY_CURRENT_USER, Identities, Last User ID
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Deleted Items.dbx,%a_workingdir%
Progress, 10
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Drafts.dbx ,%a_workingdir%
Progress, 20
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Folders.dbx ,%a_workingdir%
Progress, 30
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Inbox.dbx ,%a_workingdir%
Progress, 40
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Offline.dbx ,%a_workingdir%
Progress, 50
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Outbox.dbx ,%a_workingdir%
Progress, 60
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Pop3uidl.dbx ,%a_workingdir%
Progress, 70
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\saves.dbx ,%a_workingdir%
Progress, 80
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Sent Items.dbx ,%a_workingdir%
Progress, 90
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\folders.avx ,%a_workingdir%
Progress, 100
Sleep, 200
Progress, Off

The porgress bar will grow abruptly(abruptly??Is it correct).
If you want a bar growing smoothly you will need to use some Math commands
or a loop (ehehe) after each FileCopy.

I will disconnect now, Good luck


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2004, 5:46 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
Thank you , that one works .. :)

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2004, 7:32 am 
Offline

Joined: October 12th, 2004, 11:34 pm
Posts: 74
Location: São Paulo ,Brazil
You can use this one when you don't know the names of the files the source folder contains.
This time we WILL USE a loop, and I tested this one. :wink:
Important:
Bobheart, check the source path carefully,Reading another time all the scripts posted here
I observed that sourcepath was not always the same.

Code:
IfExist, C:\WINDOWS\system32\ntimage.gif, SplashImage, C:\WINDOWS\system32\ntimage.gif, A,,, Copying
Progress, H80, , Installing..., Draft Installtion
RegRead, OutputVar, HKEY_CURRENT_USER, Identities, Last User ID
SourcePath = %USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express
DestPath = C:\Documents and Settings\Candles\My Documents\my code projects\reg-backup\test
Loop, %SourcePath%\*.*, 0 ;will not consider folders
   {
      ?numberOfFiles = %A_Index%
   }
?step = 100
?step /= %?numberOfFiles%
Loop, %SourcePath%\*.*
{
   FileCopy,%A_LoopFileFullPath%, %DestPath%\%A_LoopFileName%
   Progress, %?step%, %a_loopfilename%, Installing..., Draft Installtion
   ?step *= %A_Index%
}
Sleep, 1000
Progress, Off


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2004, 7:46 am 
Offline

Joined: November 6th, 2004, 11:03 am
Posts: 170
Location: Salt Lake City, UT
I changed a few lines of your code so the progress bar really does add incrementally. I copied ?step into another variable and then added that (?stepincrement) to ?step within the loop. Hope you don't mind! :D :D
Code:
IfExist, C:\WINDOWS\system32\ntimage.gif, SplashImage, C:\WINDOWS\system32\ntimage.gif, A,,, Copying
Progress, H80, , Installing..., Draft Installtion
RegRead, OutputVar, HKEY_CURRENT_USER, Identities, Last User ID
SourcePath = %USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express
DestPath = C:\Documents and Settings\Candles\My Documents\my code projects\reg-backup\test
Loop, %SourcePath%\*.*, 0 ;will not consider folders
   {
      ?numberOfFiles = %A_Index%
   }
?step = 100
?step /= %?numberOfFiles%
?stepincrement = %?step%
Loop, %SourcePath%\*.*
{
   FileCopy,%A_LoopFileFullPath%, %DestPath%\%A_LoopFileName%
   Progress, %?step%, %a_loopfilename%, Installing..., Draft Installtion
   ?step += %stepincrement%
}
Sleep, 1000
Progress, Off


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 20th, 2004, 6:59 pm 
Offline

Joined: October 12th, 2004, 11:34 pm
Posts: 74
Location: São Paulo ,Brazil
Wow, I didn't notice this flaw. :!: I guess I was becoming mad with this sequence of replys :)
Thanks for the correction.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: HotkeyStick, SKAN, tomL, Yahoo [Bot] and 72 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