AutoHotkey Community

It is currently May 26th, 2012, 12:18 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: September 13th, 2008, 8:22 am 
Offline

Joined: September 13th, 2008, 7:16 am
Posts: 3
hi everybuddy i m newbie with autohotkey. i have made a program with wich we can change backgroung of any folder replacing with any wallpaper we choose.please give feedback is there any improvement required. thnk u. :D :!:




:arrow: http://www.autohotkey.net/~bonzybuddy/custom%20folder%20wallpaper.rar


Code:
ver=1.0
#WinActivateForce

Gui 2:Default
gui, color, white
gui, -caption -border +alwaysontop +toolwindow
Gui, add, picture, x0 y0 backgroundtrans,gFx_bkg.bmp
Gui, font, s15 cwhite
Gui, add, text, x25 y50 backgroundtrans,Folder Backgrounds
Gui, font, s10 cwhite
Gui, add, text, x25 yp+25 backgroundtrans, Created by Sagar
Gui, font, s9 cwhite
Gui, font, s10
Gui, add, text, x200 y130 backgroundtrans, ver %ver%
Gui, add, text, x330 y130 cgray  backgroundtrans, loading...
gui, show, w417 h155 Hide, %a_username% @ %scriptname%

;-------enables slide in -------
Gui +LastFound
GUI_Span_hndl := WinExist()
DllCall("AnimateWindow","UInt",GUI_Span_hndl,"Int",1000,"UInt","0xa0000") ;slide in
;--------slideout---------------
sleep 3000
DllCall("AnimateWindow","UInt",GUI_Span_hndl,"Int",1000,"UInt","0x90000") ;slide out span
Gui,destroy

;/////////////////// SPAN END //////////////////////////////////////////////////


Gui, add, Text,cwhite BackgroundTrans , Select Folder:
Gui, Add, Edit,cGray w500 h20 BackgroundTrans vOutputVar1, Please select your Folder

Gui, Add, Button, cBlue gLaunchGoogle, Browse

Gui, add, Text,cwhite BackgroundTrans , Select Wallpaper:
Gui, Add, Edit,cGray w500 h20 BackgroundTrans vSelectedFile, Please select your Picture file
Gui, Add, Button, cBlue gSelectFile, Browse
Gui, Add, Button,w100 cBlue gGo, Go!
Gui, Add, Button,-wrap xp+120 yp w100 cBlue gRemoveIt,Remove
Gui, Add, Button,xp+120 yp w100 cBlue gExit,Exit
Gui, Font, norm

Gui, add, picture,xp+250 yp ,mail.png

Gui, Show


return




SelectFile:
FileSelectFile, SelectedFile, , , Open a file, Wallpapers (*.jpg; *.bmp)
if (!Errorlevel)
    {
      GUICONTROL,, SelectedFile,%SelectedFile%
    }
return
LaunchGoogle:
FileSelectFolder, OutputVar1, ,, Select your Folder
if (!Errorlevel)
    {
      GUICONTROL,, OutputVar1,%OutputVar1%
    }
return

Go:
{
IniWrite, %SelectedFile%,

%OutputVar1%\desktop.ini,{BE098140-A513-11D0-A3A4-00C04FD706EC},IconArea_Image
FileSetAttrib, +S, %OutputVar1%, 1
FileSetAttrib, +SH, %OutputVar1%\desktop.ini, 1
msgbox,Done!
Run ,%OutputVar1%

sleep,4000
msgbox,4,Hope you like it,Would you like to keep it?
WinActivate,msgbox
IfMsgBox Yes
{
return
}
Else IfMsgBox No
{
WinGetTitle, Title1, A
FileDelete,%OutputVar1%\desktop.ini

Winclose,%Title1%
sleep,2000
Run ,%OutputVar1%
}
Return

RemoveIt:
{
FileSelectFolder, OutputVar2, ,, Select your Folder with Wallpaper
if (!Errorlevel)
    {
      GUICONTROL,, OutputVar2,%OutputVar2%
    }
FileDelete,%OutputVar2%\desktop.ini
Run ,%OutputVar2%
}
Return



Exit:
Exitapp

so here is script i wrote and as u all recomanded to me to put here.

post is edited and remove button added and script and exe file both updated you can try Downloading newfile with new feature nad dont forget how it is.


Last edited by bonzybuddy on September 15th, 2008, 5:39 am, edited 3 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 13th, 2008, 7:21 pm 
Offline

Joined: May 25th, 2007, 6:13 pm
Posts: 373
Not that anyone has asked my opinion, but it's not a good idea to download an unknown program. This RAR file only has an .exe file and I, for one, will NOT even attempt to activate it - especially since the Exe2Ahk doesn't seem to recognize it. If you would kindly put up the script then maybe someone will see what it's about.
Of course, if this is some lame attempt at a virus or other malware, well, you're on the wrong forum for any appreciation of it {and it's probably not all that great anyway}.

Ciao,
Dra'Gon

_________________
Image
For a good laugh {hopefully} >> megamatts.50megs.com

My WritersCafe profile>>
http://www.writerscafe.org/writers/BlueDragonFire/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 13th, 2008, 10:26 pm 
Online
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Thanks for posting the code bonzybuddy! :)

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Another option
PostPosted: September 14th, 2008, 6:39 am 
Offline

Joined: September 15th, 2006, 10:25 am
Posts: 567
Would it be nice to add a button to clear the folder of the wallpaper also, just in case a person want to revert back to the plain look?

_________________
If i've seen further it is by standing on the shoulders of giants

my site | ~shajul | WYSIWYG BBCode Editor


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2008, 7:45 pm 
Offline

Joined: May 25th, 2007, 6:13 pm
Posts: 373
LOL! That's actually pretty cool! Let's see, one suggestion {along with shajul's} would be options for Stretch or Tiled. Hmm, I always use FreeCommander instead of the Windows Explorer and I noticed the background doesn't show up in FreeCommander. I don't suppose there's anyone here who can figure out how to get that{?}. Other than that I like it. Thanks a bunch!

Ciao,
Dra'Gon

P.S. I do apologize for my earlier comment. Sometimes it pays to be a little paranoid with so much possibility for mischief.

_________________
Image
For a good laugh {hopefully} >> megamatts.50megs.com

My WritersCafe profile>>
http://www.writerscafe.org/writers/BlueDragonFire/


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: bbwht, oldbrother and 58 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