Jump to content

Recommended Posts

Posted (edited)

Hello I'm beginner of Autoit and i have some problems! Please Help me!

I'm have some beautiful icons and picture, and i added them to my gui but when i compiled it to .exe and the URL of this icons + picture changed, All the icons + pics disappear! what should i do? Help me! :) i don't know how to use Autoitwraperr_gui.exe Somebody can teach me to use it? thx so much!

Edited by LeHuynhNam

4m848p10.gif 

Posted

Is there also a possibility to click on the image so it will take you to a website?

FLX

Yes.

#include <GuiConstants.au3>
#include <StaticConstants.au3>

GUICreate("My GUI picture", 350, 300, -1, -1, $WS_SIZEBOX + $WS_SYSMENU)
$pic = GUICtrlCreatePic(@SystemDir & "\oobe\images\mslogo.jpg", 50, 50, 200, 50)
GUISetState()

While 1
 $msg = GUIGetMsg()
 If $msg = $GUI_EVENT_CLOSE Then ExitLoop
 If $msg = $pic Then Run(@ComSpec & " /c " & 'start www.autoitscript.com/forum/', "", @SW_HIDE)
WEnd
  • Developers
Posted

I thought the example in the SciTE4AutoIt3 helpfile was pretty explicit (after updating to the correct include file .. :)

#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\au3.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype1.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype2.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype3.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype-blank.ico
#include <ButtonConstants.au3>
GUICreate("Demo resource ICO's")
$h_Button1 = GUICtrlCreateButton("my picture button", 10, 20, 40, 40, $BS_ICON)
GUISetState()
For $x = 0 To 7
    $rc = TraySetIcon(@ScriptFullPath, -$x)
    $rc2 = GUICtrlSetImage($h_Button1, @ScriptFullPath, -$x)
    If $x < 3 Then
        TrayTip("Default ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3)
    Else
        TrayTip("New ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3)
    EndIf
    Sleep(2000)
Next
GUIDelete()

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

Yes.

#include <GuiConstants.au3>
#include <StaticConstants.au3>

GUICreate("My GUI picture", 350, 300, -1, -1, $WS_SIZEBOX + $WS_SYSMENU)
$pic = GUICtrlCreatePic(@SystemDir & "\oobe\images\mslogo.jpg", 50, 50, 200, 50)
GUISetState()

While 1
 $msg = GUIGetMsg()
 If $msg = $GUI_EVENT_CLOSE Then ExitLoop
 If $msg = $pic Then Run(@ComSpec & " /c " & 'start www.autoitscript.com/forum/', "", @SW_HIDE)
WEnd
Thanks a lot Zedna! Now I understand what I did wrong :)

I got it working now, thanks again.

Regards,

Dennis

Posted (edited)

Thx for helping but i've still wondered

Yes.

#include <GuiConstants.au3>
#include <StaticConstants.au3>

GUICreate("My GUI picture", 350, 300, -1, -1, $WS_SIZEBOX + $WS_SYSMENU)
$pic = GUICtrlCreatePic(@SystemDir & "\oobe\images\mslogo.jpg", 50, 50, 200, 50)
GUISetState()

While 1
 $msg = GUIGetMsg()
 If $msg = $GUI_EVENT_CLOSE Then ExitLoop
 If $msg = $pic Then Run(@ComSpec & " /c " & 'start www.autoitscript.com/forum/', "", @SW_HIDE)
WEnd
Well, when u compiled this code to *.exe, and the URL of "@SystemDir & "\oobe\images\mslogo.jpg" changed, the picture disappeared. So the problem i want to ask here is how can i add my picture to gui when i compile the *.au3 to *.exe and i can use it any PC. I also want to know how to use AutoitWrapper_gui.exe! Please help me! thx

I also see the topic "how to work with AutoIt3Wrapper" but i want to know the real code with extra file such as *.jpg not an icon.

Sorry for my silly questions! but i'm beginner of autoit and i'm also English learner! forgive me if i ask some silly question

Edited by LeHuynhNam

4m848p10.gif 

Posted

Thx for helping but i've still wondered

Well, when u compiled this code to *.exe, and the URL of "@SystemDir & "\oobe\images\mslogo.jpg" changed, the picture disappeared.

Example:

#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>

FileInstall("C:\Windows\System32\oobe\images\mslogo.jpg", @TempDir & "\mslogo.jpg")

Dim $sURL = "www.autoitscript.com/forum"

GUICreate("My GUI picture", 350, 300, -1, -1, BitOR($WS_SIZEBOX, $WS_SYSMENU))

$pic = GUICtrlCreatePic(@TempDir & "\mslogo.jpg", 50, 50, 200, 50)
GUICtrlSetCursor(-1, 0)

GUISetState()

While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    If $msg = $pic Then ShellExecute($sURL)
WEnd

FileDelete(@TempDir & "\mslogo.jpg")
Posted

Example:

#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>

FileInstall("C:\Windows\System32\oobe\images\mslogo.jpg", @TempDir & "\mslogo.jpg")

Dim $sURL = "www.autoitscript.com/forum"

GUICreate("My GUI picture", 350, 300, -1, -1, BitOR($WS_SIZEBOX, $WS_SYSMENU))

$pic = GUICtrlCreatePic(@TempDir & "\mslogo.jpg", 50, 50, 200, 50)
GUICtrlSetCursor(-1, 0)

GUISetState()

While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    If $msg = $pic Then ShellExecute($sURL)
WEnd

FileDelete(@TempDir & "\mslogo.jpg")
thanks, I understood!

4m848p10.gif 

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
×
×
  • Create New...