AutoHotkey Community

It is currently May 27th, 2012, 10:18 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: January 29th, 2005, 9:09 am 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
If you remember my SplashImage Sizer script here, then you'll know what this one is about.

Accept it! ..Splash windows look cool, and are useful too. But sizing them right to fit the maintexts, subtexts, images etc. and then making them look good is time consuming... so here's something to help u. Use this script to put in Text for Splash and size it using arrow keys... and when u get it right, press escape and the cmd reqd will be copied to clipboard... simple!... Its completely "what you see is what you get"

Hint : Keeping the window Title field blank generates a Splash without window titlebar (looks nice).

Code:
;The step-size per change (in pixels)
Step = 5

Gui, Add, Text, x6 y5 w100 h20, Window Title
Gui, Add, Text, x6 y55 w100 h20, Main Text
Gui, Add, Text, x6 y125 w100 h20, Picture
Gui, Add, Text, x6 y175 w100 h20, Sub Text

Gui, Add, Edit, x6 y25 w220 h20 vSTitle,
Gui, Add, Edit, x6 y75 w220 h40 vMText,
Gui, Add, Edit, x6 y145 w180 h20 ReadOnly vPicFile,
Gui, Add, Button, x196 y145 w30 h20, ..
Gui, Add, Edit, x6 y195 w220 h40 vSText,

Gui, Add, Button, x36 y245 w60 h20 Default, OK
Gui, Add, Button, x136 y245 w60 h20, Cancel

Gui, Show, x255 y75 h276 w233, Splasher
Return

ButtonCancel:
GuiClose:
   ExitApp


Button..:
   FileSelectFile, SelFile,,, Select Picture File
   GuiControl,, PicFile, %SelFile%
Return


ButtonOk:
   Gui, Submit
   SWidth = 150
   SHeight = 100
   IfEqual, STitle,
      Options = B1
   SplashImage,%PicFile%, W%SWidth% H%SHeight% %Options%,%SText%,%MText%,%STitle%
   HotKey, Up, Up
   HotKey, Down, Down
   HotKey, Left, Left
   HotKey, Right, Right
   HotKey, Esc, Esc
Return


Up:
   IfGreaterOrEqual, SHeight, %Step%
      SHeight -= %Step%
   SplashImage,%PicFile%, W%SWidth% H%SHeight% %Options%,%SText%,%MText%,%STitle%
Return


Down:
   SHeight += %Step%
   SplashImage,%PicFile%, W%SWidth% H%SHeight% %Options%,%SText%,%MText%,%STitle%
Return


Left:
   IfGreaterOrEqual, SWidth, %Step%
      SWidth -= %Step%
   SplashImage,%PicFile%, W%SWidth% H%SHeight% %Options%,%SText%,%MText%,%STitle%
Return


Right:
   SWidth += %Step%
   SplashImage,%PicFile%, W%SWidth% H%SHeight% %Options%,%SText%,%MText%,%STitle%
Return


Esc:
   SplashImage, Off
   StringReplace, MText, MText, `n, ``n, A
   StringReplace, SText, SText, `n, ``n, A
   SetEnv, ClipBoard, SplashImage`, %PicFile%`, W%SWidth% H%SHeight% %Options%`, %SText%`, %MText%`, %STitle%`n
   StringReplace, ClipBoard, ClipBoard, %A_Space%`,, `,, A
   SplashTextOn, 273, 46, Done!, The required command is copied to ClipBoard.
   Sleep, 500
   ExitApp
Return

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 29th, 2005, 10:54 am 
Any special requirements ? +1.0.2x ??? :twisted:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 29th, 2005, 11:11 am 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
I usually have the latest version of ahk, so if anyone can't get any of my scripts to work then first check that u have atleast a version thats not older than the timestamp of post or last edit time.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 29th, 2005, 11:18 am 
Thx. :wink:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 29th, 2005, 3:27 pm 
That T:idea:8)L = C:D:DL . Thx Rajat.


Report this post
Top
  
Reply with quote  
 Post subject: Working great
PostPosted: November 7th, 2005, 9:07 pm 
Working great


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 22nd, 2007, 7:56 am 
Offline

Joined: June 14th, 2006, 7:49 am
Posts: 3
Looks cool, thanx.. :)

Maybe its an idea to add an option where you select a specific height and width? But, if you dont add an image to the splash window, then you should be able to choose for automatic size like it does now.

Good work, though!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 29th, 2010, 7:25 pm 
Offline

Joined: August 18th, 2009, 12:07 pm
Posts: 375
Location: holland
Doesnt work for me, i press escape and nothing is copied to the clipboard
ooops ignore this, it works fine :oops: :oops: :oops:

_________________
"Choose your parents wisely"


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: specter333, XX0 and 23 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