 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
TheLeO
Joined: 11 Jun 2005 Posts: 201 Location: England ish
|
Posted: Wed Nov 25, 2009 7:46 am Post subject: GUI consists of only a backgroud image, how do I move it? |
|
|
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.
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
|
_________________ And i say: where there is a problem , there is a solution.(well some where that is.)
::
I Have Spoken
:: |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 7159
|
Posted: Wed Nov 25, 2009 8:47 am Post subject: |
|
|
| 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
|
|
|
| Back to top |
|
 |
Leef_me
Joined: 08 Apr 2009 Posts: 1158 Location: San Diego, California
|
Posted: Wed Nov 25, 2009 8:06 pm Post subject: |
|
|
@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 |
|
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 7159
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|