AutoHotkey Community

It is currently May 27th, 2012, 2:48 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: November 25th, 2009, 8:46 am 
Offline

Joined: June 11th, 2005, 9:34 am
Posts: 264
Location: England ish
Hello,

I'm in support and I'm building a utility to help users collect msi-logs to address roll-back issues.

The gui consists of a bunch of images which acts as background, Labels & buttons.

Image


Since it hasn't got a Caption, you can't move it around if you wanted to.

Any Ideas as to how I could achive window moving by just clicking on the background image...? :?


Many thanks in advance!

Leo.


Code:

;ze code... less images.

Menu, TRAY, Icon, Icon.ico
Gui, Add, Picture, x0 y0 w743 h537 , Background.jpg
Gui, Add, Picture, x415 y98 w83 h30 , Install.jpg
Gui, Add, Picture, x414 y135 w136 h35 , Uninstall.jpg
Gui, Add, Radio, x404 y110 w13 h16 Checked vInstallType, Install
Gui, Add, Radio, x405 y144 w13 h16 , Uninstall
Gui, Add, Picture, x376 y182 w92 h40 , Msipath.jpg
Gui, Add, Picture, x378 y212 w108 h35 , Logpath.jpg
Gui, Add, Edit, x464 y191 w173 h21 vMsiPath, C:\AcronisAgentWindows.msi
Gui, Add, Edit, x463 y223 w175 h21 vLogPath, C:\AcronisInstallationLog.log
Gui, Add, Picture, x433 y279 w217 h68 gStartInstaller, Startinstaller.jpg
Gui, Add, Picture, x660 y11 w69 h27 gCloseTheGui, Close.png
Gui, Add, Picture, x438 y350 w217 h48 gContactSupport, ContactSupport.png
Gui, Add, Picture, x437 y407 w218 h48 gSelfService, SelfService.png
Gui, Add, Button, x640 y190 w49 h23 gBrowseMsi, Browse
Gui, Add, Picture, x692 y177 w46 h46 gquestionmark, QuestionMark.png
Gui, Add, Button, x640 y221 w49 h23 gBrowseLog, Browse
; Generated using SmartGUI Creator 4.0
gui, -caption


Gui, Show, xCenter yCenter h543 w746, Acronis Intstaller with Logging
Return


OnExit, deleteImages

deleteImages:
FileDelete, Background.jpg
FileDelete, Install.jpg
FileDelete, Uninstall.jpg
FileDelete, Msipath.jpg
FileDelete, Logpath.jpg
FileDelete, Startinstaller.jpg
FileDelete, Icon.ico
FileDelete, ContactSupport.png
FileDelete, SelfService.png
FileDelete, QuestionMark.png
FileDelete, Close.png
FileDelete, HowToExtract.jpg
ExitApp


BrowseMsi:
FileSelectFile, SelectedMsiPath, 1, , Please Loacate the MSI file, Microsoft Installer (*.msi)
if SelectedMsiPath =
    MsgBox, Please select the path to the Microsoft Installation file(MSI). Please click on the help button for details.
else
    ControlSetText, edit1, %SelectedMsiPath%
return



BrowseLog:
FileSelectFile, SelectedLogPath, s 8, , Save Log to, Installation Log (*.log)
if SelectedLogPath =
    MsgBox, Please select a location for the msi log.
else
    ControlSetText, edit2, %SelectedLogPath%
return

questionmark:
Gui 2:Default
gui -caption
Gui, Add, Pic, x0 y0 vPic
GuiControl,, Pic, *w0 *h0 HowToExtract.jpg
Gui, Add, Picture, x660 y11 w69 h27 gCloseTheGui2, Close.png
Gui, Show, xCenter yCenter h680 w739, %file%
Gui 1:Default
return


CloseTheGui:
GuiClose:
ExitApp

CloseTheGui2:
gui 2:Destroy
return

SelfService:
run http://kb.acronis.com/content/1647
Return

ContactSupport:
run http://www.acronis.com/support/
return

StartInstaller:
;type 1 is install, type 2 is uninstall.
gui, submit

If InstallType = 1
   InstallTypeFinal = /i
Else
   InstallTypeFinal = /x

cmdLine = msiexec %InstallTypeFinal% %MsiPath% /l*v %LogPath%

filedelete, InstallAgentWithLog.bat
FileAppend, %cmdLine%, InstallAgentWithLog.bat
run, InstallAgentWithLog.bat
return



_________________
::
I Have Spoken
::


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 25th, 2009, 9:47 am 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Code:
UrlDownloadToFile, http://www.autohotkey.com/docs/images/AutoHotkey_logo.gif, ahk.gif
Gui -Caption +AlwaysOnTop
Gui, Margin, 0, 0
Gui, Add, Picture, x0 y0 gGuiMove, ahk.gif
Gui, Show

GuiMove:
 SendMessage, 0xA1, 2,,, A
Return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 25th, 2009, 9:06 pm 
Offline

Joined: April 8th, 2009, 7:49 pm
Posts: 6071
Location: San Diego, California
@SKAN
Can it be made so that the GIF can be moved within the GUI ?
For example, with your script if you change one line the GUI gets bigger than the GIF.
Code:
Gui, Show, w400 h400


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 25th, 2009, 9:13 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Why not?

How to enable Drag for a Static Control ?
http://www.autohotkey.com/forum/viewtop ... 732#123732


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: rbrtryn, XstatyK 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:
cron
Powered by phpBB® Forum Software © phpBB Group