Jump to content

Resources UDF


Zedna
 Share

Recommended Posts

  • Moderators

JamesBrooks,

Best ask Jos!

I take it it works for you now?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Developers

Wondering what you guys think needs fixing?

The WorkDir at compilation time will be the directory of the script, so you either have to ensure that the path to the utilities is in the PATH environment variable or you need to specify the fully qualified path to the program.

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.
  :)

Link to comment
Share on other sites

  • Moderators

Jos,

I am quite happy with AutoIt3Wrapper as it stands.

But I was a bit confused at first when I discovered the Resources UDF and tried to use this from the first page of this thread:

#AutoIt3Wrapper_run_after=ResHacker.exe -add %out%, %out%, image3.jpg, rcdata, TEST_JPG_1, 0

#AutoIt3Wrapper_run_after=upx.exe --best --compress-resources=0 "%out%

I tried putting ResHacker and upx in all sorts of places within the AutoIt folder structure before I decided to go back to basics and include the full path. Having a copy of upx in the Aut2Exe folder from the install and finding that even there it would not work without a path confused me even more - but then at my age that is not uncommon!

I see Zedna has changed some of the examples in the first post to include a path - when he comes out with his new version I am sure he will change all of them.

M23

Edited: speeling!

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Developers

I tried putting ResHacker and upx in all sorts of places within the AutoIt folder structure before I decided to go back to basics and include the full path. Having a copy of upx in the Aut2Exe folder from the install and finding that even there it would not work without a path confused me even more - but then at my age that is not uncommon!

:P

Yea you would have to put it in the script directory for it to work properly.

Jos

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.
  :)

Link to comment
Share on other sites

I see Zedna has changed some of the examples in the first post to include a path - when he comes out with his new version I am sure he will change all of them.

M23

Edited: speeling!

No I will not change my examples to use full path for reshacker/upx. It's up to users where they have placed their utilities.

In my first post there are important notes:

Notes:

* to compile all script examples you must have installed Scite4AutoIt3 also with reshacker.exe/upx.exe in "Windows search path" or script directory -> you must compile script by F7 from full Scite

Edited by Zedna
Link to comment
Share on other sites

  • Moderators

Zedna,

My apologies.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Hi to all,

Here is my probem:

I'm working with lod3n's launcher and I need to use a grey background for the transparent child gui...

Everything works great when I call grey.gif from file.

Ex:

GUICtrlCreatePic("grey.gif", 0, 0, $Gui_Width, $Gui_height)

But when I use Zedna's UDF an do like this:

$hBmp = _ResourceGet("TEST_BMP_2", $RT_BITMAP)
$Ctrl = GUICtrlCreatePic("", 0, 0, $Gui_Width, $Gui_height)
_SetBitmapToCtrl($Ctrl, $hBmp)
it does not work...

And it doesn't work when I do this eighter:

GUICtrlCreatePic("", 0, 0, $Gui_Width, $Gui_height)
GuICtrlSetImage(-1,"grey.gif")

So I think I need to obtain a file handle for grey.gif from the resources and use it directly in first ctrl creation not after creating a blank one. Like:

GUICtrlCreatePic($Grey_Gif_Handle, 0, 0, $Gui_Width, $Gui_height)

Some notes:

grey.gif and grey.bmp work without any problem but grey.jpg doesn't work correctly.

_ResourceGetAsImage() works for pngs in my script but it doesn't work for the grey.gif.

lod3n's loader can be obtained from here : lod3n's loader

Thanks in advance

[center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center]

Link to comment
Share on other sites

  • Moderators

tip,

You are using the wrong function from the UDF. If you look at _SetBitmapToCtrl it says "; internal helper function". What you need to use is _ResourceSetImageToCtrl.

This code is taken from one of my scripts and works without problem:

; Load bmp resource
#AutoIt3Wrapper_Run_After=ResHacker.exe -add %out%, %out%, fred.bmp, bitmap, FRED, 0
;
; Use bmp resource
$hPic = GUICtrlCreatePic("", 10, 186, 160, 16)
_ResourceSetImageToCtrl($hPic, "FRED", $RT_BITMAP)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Thank you very much for the quick reply but as

GUICtrlCreatePic("", 0, 0, $Gui_Width, $Gui_height)
GuICtrlSetImage(-1,"grey.gif")

doesn't work, the way you suggested generates same error. When I first create a blank pic control then fill it, I don't know why but it doesn't work.

I guess I need to pass my grey.gif or grey.bmp from resource to a handle then use the handle in GUICtrlCreatePic($Handle_Needed, 0, 0, $Gui_Width, $Gui_height)... :P...

Edited by tip

[center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center]

Link to comment
Share on other sites

  • Moderators

tip,

How does your stored resource appear in ResHacker or any other resource utility? What section of the .exe is it in and what is it called? If the parameters for the function are not correct, there is no chance of the UDF working.

I cannot speak highly enough of this UDF - if it is not working, it is the normally the user's fault - and I should know!

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I beleive that the UDF works just fine. My other jpgs,pngs,icos work fine. The porblem is that lod3r's launcher accept only gifs and bmps. And it is very important to put image files during the control creation not afterwards.

GUICtrlCreatePic("", 0, 0, $Gui_Width, $Gui_height)
GuICtrlSetImage(-1,"grey.gif")
does NOT work...

It has to be like :

GUICtrlCreatePic("grey.gif", 0, 0, $Gui_Width, $Gui_height)

So :

$hPic = GUICtrlCreatePic("", 10, 186, 160, 16)
_ResourceSetImageToCtrl($hPic, "FRED", $RT_BITMAP)
is not working not because of Zedna's UDF

I need something like this:

$Grey_Gif_Handle = _FunctionNeeded("GREY_1")
GUICtrlCreatePic($Grey_Gif_Handle, 0, 0, 300, 500)

I need to have file handle to make launcher work...

Thanks again...

Edited by tip

[center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center]

Link to comment
Share on other sites

  • Moderators

tip,

Sounds like FileInstall is the way to go! Sorry I could not help more.

M23

Edit: Formatting!!!!

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

tip,

Sounds like FileInstall is the way to go! Sorry I could not help more.

M23

Edit: Formatting!!!!

@tip

it's also possible to use the lod3n launcher (f.e.) without that grey.gif.

See here: "_WinAPI_SetLayeredWindowAttributes" (-> http://www.autoitscript.com/forum/index.php?showtopic=74560)

It works, I use lod3n's launcher like that.

kind regards

You can fool some of the people all of the time, and all of the people some of the time, but you can not fool all of the people all of the time. Abraham Lincoln - http://www.ae911truth.org/ - http://www.freedocumentaries.org/
Link to comment
Share on other sites

@tip

You mixed bitmap and gif

Gif must be stored as rcdata type inside resources.

Here is example how to work with bimap and gif:

#AutoIt3Wrapper_Run_After=ResHacker.exe -add %out%, %out%, fred1.bmp, bitmap, FRED1, 0
#AutoIt3Wrapper_Run_After=ResHacker.exe -add %out%, %out%, fred2.gif, rcdata, FRED2, 0

; bitmap
$hPic1 = GUICtrlCreatePic("", 10, 186, 160, 16)
_ResourceSetImageToCtrl($hPic1, "FRED1", $RT_BITMAP)

; gif
$hPic2 = GUICtrlCreatePic("", 10, 226, 160, 16)
_ResourceSetImageToCtrl($hPic2, "FRED2", $RT_RCDATA)
Edited by Zedna
Link to comment
Share on other sites

  • Moderators

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I did not understand it reshaker by Angus Johnson?

I think the special needs for AutoIt.

------------

edit

Melba23, Thank you for the clarification. This reshaker I have.

Now all the examples work.

Edited by ynbIpb
Link to comment
Share on other sites

  • Moderators

ynbIpb,

That is the file you need to download. AutoIt does not have its own special version.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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...