Jump to content

Getting rid of the White around a GIF


Dalex
 Share

Recommended Posts

I have tried on my own for hours, and searched the forum also, I just cant figure out how to make the .GIF to display without the white box around the Wizard.......

Here is the empty shell of my script.

#include <GUIConstants.au3>
Opt("GUIOnEventMode", 1)  ; Change to OnEvent mode


GUICreate("Test", 450, 490)  ; will create a dialog box that when displayed is centered
GUISetBkColor (0x5CACEE);sets the background color of the window
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
GUISetState (@SW_SHOW)       ; will display the dialog box


Func CLOSEClicked()
 
SoundPlay (@WindowsDir & "\Media\Windows XP Print complete.wav",1) ;plays a sound and waits until it has finshed before it exits.
 Exit
EndFunc


SoundPlay(@WindowsDir &  "\Media\chimes.wav") ;plays a sound when opening the window

GUICreate("Just a snip of the code", 450, 490)  ; will create a dialog box that when displayed is centered
GUISetBkColor (0x5CACEE);sets the background color of the window
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
GUISetState (@SW_SHOW)       ; will display the dialog box

;Labels button usage
GUICtrlCreateLabel("USE WHEN CONFIGURING ADMINISTRATOR.", 10, 20)
GUICtrlSetBkColor(-1,0xd3d3d3) ; Colors the label :Gray

GUICtrlCreateLabel("USE WHEN CONFIGURING USER AND ADMINISTRATOR", 10, 200)
GUICtrlSetBkColor(-1,0xd3d3d3) ; Colors the label :Gray


GUICtrlCreatePic(@Systemdir & "\oobe\images\merlin.gif",360,10,0,0)

GUISetState()

 


While 1
 Sleep(1000)  ; Mainline will just idle around until an event happens.
WEnd
    $msg = GUIGetMsg()

[size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size]

Link to comment
Share on other sites

Could you upload the image for us to see, perhaps it is something with the image that makes it like that.

[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Link to comment
Share on other sites

Could you upload the image for us to see, perhaps it is something with the image that makes it like that.

The image is a system file , should be on any machine running XP

see the line in the code "GUICtrlCreatePic(@Systemdir & "\oobe\images\merlin.gif",360,10,0,0)"

Edited by Dalex

[size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size]

Link to comment
Share on other sites

I looked at all of those examples before posting but just wasn't sure I was in the right place.

as a matter of fact that same help file is where I got the gif in the first place, I just could not get it to work

Thanks guys for replying, I finaly got it right in my script.

Here is a post of the code, I use this to configure multiple computers at a time, I burn the script to discs along with a file that contains all of the scripts that are on the menu. put an Autorun.inf on there and a label and warning icon (so it reminds us to remove the disk before shipping) can be used on desktops and laptops.

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author:  xxxxxxxxxxxxxxxxxxxxxxxxxxxDalex     
;
; Script Function: WINCONFIG 7 Menu

; ----------------------------------------------------------------------------

 

#include <GUIConstants.au3>


Opt("GUIOnEventMode", 1)  ; Change to OnEvent mode


;Declare varibles

Dim $checkJoinDomain 
Dim $checkNetwork 
Dim $checkRemoves
Dim $checkHide
Dim $checkUnchecks
Dim $checkDelete 
Dim $checkHomePage
Dim $Startmenu
Dim $checkPerformance
Dim $M23ToshibaPower
Dim $M5ToshibaPower
Dim $checkPower
Dim $checkDesktop 
Dim $checkFirewall 
Dim $Reboot

Dim $UninstallButton
Dim $okButton


Dim $PathExe 
Dim $driveTypeD
Dim $driveTypeE


;Selects the correct path to the CDROM
$driveTypeD = DriveGetType( "D:\" )

$driveTypeE = DriveGetType( "E:\" )


If $driveTypeD == "CDROM" Then 
 $PathExe = "D:\GUI Setup\Seperate scripts\Compiled Seperate\"

 Else
EndIf
 

If $driveTypeE == "CDROM" Then 
 $PathExe = "E:\GUI Setup\Seperate scripts\Compiled Seperate\"

 Else
EndIf
 

SoundPlay(@WindowsDir &  "\Media\chimes.wav") ;plays a sound when opening the window

$gui = GUICreate("W i N C O N F i G", 450, 490)  ; will create a dialog box that when displayed is centered
GUISetBkColor (0x5CACEE);sets the background color of the window
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
GUISetState (@SW_SHOW)       ; will display the dialog box

;Labels button usage
GUICtrlCreateLabel("USE WHEN CONFIGURING ADMINISTRATOR.", 10, 20)
GUICtrlSetBkColor(-1,0xd3d3d3) ; Colors the label :Gray

GUICtrlCreateLabel("USE WHEN CONFIGURING USER AND ADMINISTRATOR", 10, 200)
GUICtrlSetBkColor(-1,0xd3d3d3) ; Colors the label :Gray

 

 

$pic=GUICreate("", 68, 71, 375, 10,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui)
GUICtrlCreatePic(@Systemdir & "\oobe\images\merlin.gif",0,0, 0,0)

GUISetState(@SW_SHOW,$pic)
GUISetState(@SW_SHOW,$gui)

 

$checkJoinDomain  = GUICtrlCreateCheckbox("Join Domain-Add user as Admin- and Reset Admin Password", 10, 40,340)
GUICtrlSetBkColor(-1,0x5CACEE) ; Color
$checkNetwork     = GUICtrlCreateCheckbox("Network components", 10, 60,340)
GUICtrlSetBkColor(-1,0x9FB6CD) ; Color
$checkRemoves     = GUICtrlCreateCheckbox("Removes Windows Components", 10, 80,340)
GUICtrlSetBkColor(-1,0x5CACEE) ; Color
$checkHide        = GUICtrlCreateCheckbox("Hide Games in SYSOC", 10, 100,340)
GUICtrlSetBkColor(-1,0x9FB6CD) ; Color
$checkUnchecks    = GUICtrlCreateCheckbox("Unchecks Local Area Connection", 10, 120,340)
GUICtrlSetBkColor(-1,0x5CACEE) ; Color
$checkeDelete     = GUICtrlCreateCheckbox("Delete Wallpaper", 10, 140,340)
GUICtrlSetBkColor(-1,0x9FB6CD) ; Color
$checkHomePage    = GUICtrlCreateCheckbox("Set the Hompage 'TheDailyOutlook.com'", 10, 160,340)
GUICtrlSetBkColor(-1,0x5CACEE) ; Color

; Secondary Checkboxes
$Startmenu        = GUICtrlCreateCheckbox("Classic Start Menu & Taskbar Settings",10,220,340)
GUICtrlSetBkColor(-1,0x5CACEE) ; Color
$checkPerformance = GUICtrlCreateCheckbox("Best Performance",10 , 240,340)
GUICtrlSetBkColor(-1,0x9FB6CD) ; Color
$M5ToshibaPower   = GUICtrlCreateCheckbox("Tecra M5 Toshiba Power Saver", 50, 260,300)
GUICtrlSetBkColor(-1,0x5CACEE) ; Color
$LanguageBar      = GUICtrlCreateCheckbox("Turn Off the Language Bar", 50, 280,300)
GUICtrlSetBkColor(-1,0x9FB6CD) ; Color
$checkPower       = GUICtrlCreateCheckbox("HP Power Scheme      (DeskTops only)", 10, 300,340)
GUICtrlSetBkColor(-1,0x5CACEE) ; Color
$checkDesktop     = GUICtrlCreateCheckbox("Desktop Classic", 10, 320,340)
GUICtrlSetBkColor(-1,0x9FB6CD) ; Color
$checkFirewall    = GUICtrlCreateCheckbox("Firewall Off", 10, 340,340)
GUICtrlSetBkColor(-1,0x5CACEE) ; Color
$Reboot        = GUICtrlCreateCheckbox("Reboot", 10, 360,340)
GUICtrlSetBkColor(-1,0x9FB6CD) ; Color

$okButton =         GUICtrlCreateButton("Execute", 10, 390, 100)
 GuiCtrlSetOnEvent($okButton, "OKButton")
 

$UninstallButton =  GUICtrlCreateButton("Remove Programs", 200, 390, 100)
 GuiCtrlSetOnEvent($UninstallButton, "UninstallButton")
 

Func UninstallButton()
 RunWait($PathExe & "\Uninstall programs.exe")
EndFunc

 

 


While 1
 Sleep(1000)  ; Mainline will just idle around until an event happens.
WEnd
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then Exit
  


Func CLOSEClicked()
 
SoundPlay (@WindowsDir & "\Media\Windows XP Print complete.wav",1) ;plays a sound and waits until it has finshed before it exits.
 Exit
EndFunc

 


Func OKButton()
 If GUICtrlRead($checkJoinDomain) = $GUI_CHECKED Then
  RunWait($PathExe & "\Join Domain and Add User and Reset Admin password.exe")
  GUICtrlSetState($checkJoinDomain, $GUI_UNCHECKED)
     EndIf
 If GUICtrlRead($checkNetwork) = $GUI_CHECKED Then
  RunWait($PathExe & "\Network components.exe")
  GUICtrlSetState($checkNetwork, $GUI_UNCHECKED)
  EndIf
 If GUICtrlRead($checkRemoves) = $GUI_CHECKED Then
  RunWait($PathExe & "\Removes Windows Components.exe")
  GUICtrlSetState($checkRemoves, $GUI_UNCHECKED)
     EndIf
 If GUICtrlRead($checkHide) = $GUI_CHECKED Then
  RunWait($PathExe & "\Hide Games in SYSOC .exe")
  GUICtrlSetState($checkHide, $GUI_UNCHECKED)
  EndIf 
 If  GUICtrlRead($checkUnchecks) = $GUI_CHECKED Then
  RunWait($PathExe & "\Unchecks Local Area Connection.exe")
  GUICtrlSetState($checkUnchecks, $GUI_UNCHECKED)
  EndIf
 If GUICtrlRead($checkeDelete) = $GUI_CHECKED Then
  RunWait($PathExe & "\Delete Wallpaper.exe")
  GUICtrlSetState($checkeDelete, $GUI_UNCHECKED)
     EndIf
 If GUICtrlRead($checkHomePage) = $GUI_CHECKED Then
  RunWait($PathExe & "\Set HomePage.exe")
  GUICtrlSetState($checkHomePage, $GUI_UNCHECKED)
  EndIf
 If  GUICtrlRead($Startmenu) = $GUI_CHECKED Then
  RunWait($PathExe & "\Classic Start  & Taskbar Menu.exe")
  GUICtrlSetState($Startmenu, $GUI_UNCHECKED)
  EndIf 
    If GUICtrlRead($checkPerformance) = $GUI_CHECKED Then
  RunWait($PathExe & "\Best Performance.exe")
  GUICtrlSetState($checkPerformance, $GUI_UNCHECKED)
     EndIf
 If GUICtrlRead($M23ToshibaPower) = $GUI_CHECKED Then
  RunWait($PathExe & "\Toshiba Power Saver M2 and M3.exe")
  GUICtrlSetState($M23ToshibaPower, $GUI_UNCHECKED)
  EndIf
 If GUICtrlRead($M5ToshibaPower) = $GUI_CHECKED Then
  RunWait($PathExe & "\M5 Toshiba Power Saver.exe")
  GUICtrlSetState($M5ToshibaPower, $GUI_UNCHECKED)
     EndIf
 If GUICtrlRead($LanguageBar) = $GUI_CHECKED Then
  RunWait($PathExe & "\Language Bar.exe")
  GUICtrlSetState($LanguageBar, $GUI_UNCHECKED)
  EndIf 
 If GUICtrlRead($checkPower) = $GUI_CHECKED Then
  RunWait($PathExe & "\Power Scheme.exe")
  GUICtrlSetState($checkPower, $GUI_UNCHECKED)
  EndIf
 If GUICtrlRead($checkDesktop) = $GUI_CHECKED Then
  RunWait($PathExe & "\Desktop Classic.exe")
  GUICtrlSetState($checkDesktop, $GUI_UNCHECKED)
  EndIf
 If GUICtrlRead($checkFirewall) = $GUI_CHECKED Then
  RunWait($PathExe & "\Firewall Off.exe")
  GUICtrlSetState($checkFirewall, $GUI_UNCHECKED)
  EndIf
 If GUICtrlRead($Reboot) = $GUI_CHECKED Then
  RunWait($PathExe & "\Reboot.exe")
  GUICtrlSetState($Reboot, $GUI_UNCHECKED)
  EndIf
EndFunc
Edited by Dalex

[size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size]

Link to comment
Share on other sites

The problem is your space in the program. I tried with

open=test.exe

Works like a charm

open=test test test.exe

Doesnt work, I even tryed with "" but no luck.. generally you should have spaces in you exe names (bad programming style)

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Link to comment
Share on other sites

The problem is your space in the program. I tried with

open=test.exe

Works like a charm

open=test test test.exe

Doesnt work, I even tryed with "" but no luck.. generally you should have spaces in you exe names (bad programming style)

I think you posted this reply while I was editing my post I thought it might be that so I tried it and it worked, so I removed that section from the post. I just looked and saw that you had replied.

Thank you for your help

For anyone who reads this post in the future: I had posted in my last post that I could not get the Autorun.inf to work without pointing it directly at the exe like this open=d:\Winconfig 7 disk.exe

Shevilie replied that it was the spacing and was exactly right.

open=Winconfig7disk.exe works perfectly!

Thank you again Shevilie

[size="2"][u]Beer is living proof that God loves us and wants us to be happy.-- Ben Franklin[/u][/size]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...