Jump to content

Recommended Posts

Posted

Is there any way in hell to change the GUI skin to make it look a little more modern ?

Kinda like how u can change the skins on XFIRE if anyone has ever used that chat program, or Winamp

thanks

Posted (edited)

Well There is some freeware activeX objects that is suppost to be able to change skins to an intuition and requesters but I never tryed one of these...

'You can change the look of your application easily adding this control to the forms. With vbSkinner Free your project will have a skin.The forms will have a ronded look, with a new title bar.This version apply the skin in all the forms with just one Skinner control. Also makes the skin in MsgBox and InputBox dialogs'

one object Homepage:

http://www.ab-archive.com/Danish/programma...english4205.htm

kjactive :whistle:

Edited by kjactive
Posted

The ActiveSkin ISkin object can change VB windows and controls. Has anyone been able to get ObjCreate("ActiveSkin4.Skin.1") to work with AutoIt?

I've tried but can't get it to work w/ AutoIt.

This object has members:

- LoadSkin("filename")

- ApplySkin(hWnd)

-Livewire

Posted (edited)

I've created a pretty good GUI for a program I've made entirely in AutoIt. Almost all of the useful scripting isn't mine, but taken from other threads here on the AutoIt forums. :whistle:

Posted Image

#NoTrayIcon
#include <GUIConstants.au3>
Opt("GUIOnEventMode", 1)
Opt("MouseCoordMode", 0); if Window Coords / , 2 if Client Coords 
Opt("PixelCoordMode", 0); Same as above

Dim $s_TempFile
$jpg = _TempFile()

FileInstall("back.jpg", $jpg)

; Caption
$caption = "Guild Wars Bot"
; Caption

$gui = GUICreate("Guild Wars Bot", 300, 400, -1, -1, $WS_POPUP + $WS_SYSMENU + $WS_MINIMIZEBOX, $WS_EX_LAYERED)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
$caption = GUICtrlCreateLabel($caption, 12, 4, 180, 14)
GUICtrlSetStyle($caption, -1, $WS_EX_TRANSPARENT); To show $caption text
GUICtrlSetStyle($caption, $DS_SETFOREGROUND)
GUICtrlSetFont($caption, 9, 400, -1, "Arial Bold")
GUICtrlSetColor($caption, 0xF5F5F5)
GUICtrlSetOnEvent($caption, "_Drag")
;GUICtrlSetBkColor($caption,0xFF00FF); To select $caption
$min = GUICtrlCreateLabel("", 250, 4, 11, 11)
GUICtrlSetOnEvent($min, "Minimize")
GUICtrlSetTip($min, "Minimize")
;GUICtrlSetStyle($min, -1, $WS_EX_TRANSPARENT); To select $min
;GUICtrlSetBkColor($min,0xFF00FF); To select $min
$close = GUICtrlCreateLabel("", 262, 4, 11, 11)
GUICtrlSetOnEvent($close, "Close")
GUICtrlSetTip($close, "Close")
;GUICtrlSetStyle($close, -1, $WS_EX_TRANSPARENT); To select $close
;GUICtrlSetBkColor($close,0xFF00FF); To select $close
GUISetState(@SW_SHOW)
GUICtrlCreateGroup ("", 170, 60, 110, 140)
GUICtrlCreateGroup ("",-99,-99,1,1);close group

GUICtrlCreateGroup ("", 170, 205, 110, 120)
GUICtrlCreateGroup ("",-99,-99,1,1);close group

GUICtrlCreateLabel("Guild Wars Bot", 187, 335)
GUICtrlCreateLabel("By JoshDB", 197, 350)
GUICtrlCreateLabel("Version " & $version, 193, 365)
GUICtrlCreateLabel("Primary Class", 180, 80)
GUICtrlCreateLabel("Secondary Class", 180, 140)
GUICtrlCreateLabel("Username", 190, 225)
GUICtrlCreateLabel("Password", 190, 275)
GUICtrlCreateLabel("Username and password fields are optional. They are only for additional features.", 45, 215, 100, 100)
GUICtrlCreateLabel("Please fill in the Primary and Secondary classes fields.", 45, 85, 100, 100)
GUICtrlCreateLabel("www.PimpMyGuide.com", 25, 170, 150, 100)

$user=GUICtrlCreateInput ("", 185, 245, 80, 20)
$pass=GUICtrlCreateInput ("", 185, 295, 80, 20, $ES_PASSWORD)

$rungw = GUICtrlCreatePic("startgw.jpg", 177, 25, 93, 11 )
  GUICtrlSetOnEvent($rungw, "rungw")
  
$startmacro = GUICtrlCreatePic("startbot.jpg", 177, 45, 93, 11)
  GUICtrlSetOnEvent($startmacro, "startmacro")

$primary=GUICtrlCreateCombo ("Warrior", 175,100); create first item
GUICtrlSetData(-1,"Ranger|Monk|Mesmer|Elementalist|Necromancer","item3"); add other item and set a new default

$secondary=GUICtrlCreateCombo ("Monk", 175,160); create first item
GUICtrlSetData(-1,"Ranger|Mesmer|Elementalist|Necromancer|Warrior","item3"); add other item and set a new default
$pic = GUICtrlCreatePic($jpg, 0, 0, 300, 400 )
GUICtrlSetOnEvent($pic, "_Drag")
$contextmenu = GUICtrlCreateContextMenu($pic)
$min_item = GUICtrlCreateMenuItem("Min", $contextmenu)
GUICtrlSetOnEvent($min_item, "Minimize")
$close_item = GUICtrlCreateMenuItem("Close", $contextmenu)
GUICtrlSetOnEvent($close_item, "Close")
_GuiRoundCorners($gui, 0, 0, 20, 20)

GUISetState(@SW_SHOW)

$StartCheck = 0

While $StartCheck < 10
  Sleep(1); Idle around
WEnd

Func rungw()
  Run("C:\Program Files\Guild Wars\gw.exe", "", @SW_MINIMIZE)
EndFunc

Func Close()
    GUISetState(@SW_HIDE)
    FileDelete($jpg)
    Exit
EndFunc

Func Minimize()
    GUISetState(@SW_MINIMIZE)
EndFunc

Func _TempFile()
    Local $s_TempName
    
    Do
        $s_TempName = "~"
        While StringLen($s_TempName) < 7
            $s_TempName = $s_TempName & Chr(Round(Random(65, 90), 0))
        WEnd
        $s_TempName = @TempDir & "\" & $s_TempName & ".tmp"
    Until Not FileExists($s_TempName)
    Return ($s_TempName)
EndFunc

Func _Drag()
    DllCall("user32.dll", "int", "ReleaseCapture")
    DllCall("user32.dll", "int", "SendMessage", "hWnd", $gui, "int", 0xA1, "int", 2, "int", 0)
EndFunc

Func _GuiRoundCorners($h_win, $i_x1, $i_y1, $i_x3, $i_y3)
   Dim $pos, $ret, $ret2
   $pos = WinGetPos($h_win)
   $ret = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", $i_x1, "long", $i_y1, "long", $pos[2], "long", $pos[3], "long", $i_x3, "long", $i_y3)
   If $ret[0] Then
      $ret2 = DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $ret[0], "int", 1)
      If $ret2[0] Then
         Return 1
      Else
         Return 0
      EndIf
   Else
      Return 0
   EndIf
EndFunc;==>_GuiRoundCorners

Some of the code I took out, because it was purely bot-related. The stuff I left was only the GUI part. They grey is the background color of Adobe Photoshop (what happened to be behind the program at the time). The corners are rounded (transparent), and the GUI is draggable, too.

Again, I only take credit in my forum-searching skills.

Edited by JoshDB
Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite

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
  • Recently Browsing   0 members

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