Bench
Active Members-
Posts
26 -
Joined
-
Last visited
About Bench
- Birthday 05/08/1958
Profile Information
-
Location
Ostrava, Czech Republic
-
Interests
Books, movies and games (all mainly sci-fi or fantasy). Unix, AutoIt.
Bench's Achievements
Seeker (1/7)
1
Reputation
-
Finally I found problem - I was using USkin.dll and it collides with showing images on buttons. I must find another way, how to do it. Without skin it works perfectly. But I have another question. How about animated GIF? It shows just first frame and nothing more.
-
When I try to use it on simple example, it is functioning. But in my program not. So problem is probably between keyboard and (my) chair. I must re-check my code. Anyway thanks for your help, guinness. I think it is not the last time I am begging for help.
-
Yep, now it is working. But I have still one question. I am changing dynamically image on buttons (which are also created dynamically). What should I do to change image (from RED to GREEN, for example)? I think I must release that image somehow, but I don't know how. And that same resource is probably used on other buttons, so function _Resource_Destroy shouldn't be the right thing. When I use just same function for setting resource, it doesn't work. I cannot see ANY image on button.
-
According to : I will need transparent images, so I need to use .PNG format. I used Zedna's Resources.au3 but there was a problem with access to DLL (not compiled source). It crashed and when I was searching for newer version, I found your ResourcesEx.au3, based on Zedna's work. I have many resources in my source and I don't want to make two versions or to have to compile every change. So I want to make DLL with my resources, use it when I run my program from SciTe and when I compile, I will have them in my .EXE
-
What am I doing wrong? #AutoIt3Wrapper_Res_File_Add=Resources\lite.png,rt_rcdata,LITE #AutoIt3Wrapper_Res_File_Add=Resources\dark.png,rt_rcdata,DARK Opt("GUIOnEventMode", 1) #include <ButtonConstants.au3> #include <GUIConstants.au3> #include "ResourcesEx.au3" If @Compiled Then $dll = @ScriptFullPath Else $dll = "Resources.dll" EndIf $main = GUICreate("Test", 270, 140) GUISetOnEvent($GUI_EVENT_CLOSE, "EndProgram") $but1 = GUICtrlCreateButton("", 20, 20, 100, 100, BitOR($GUI_SS_DEFAULT_BUTTON, $BS_FLAT, $BS_BITMAP)) _Resource_SetToCtrlID($but1, "LITE", 10, $dll) $but2 = GUICtrlCreateButton("", 150, 20, 100, 100, BitOR($GUI_SS_DEFAULT_BUTTON, $BS_FLAT, $BS_BITMAP)) _Resource_SetToCtrlID($but2, "DARK", 10, $dll) GUISetState(@SW_SHOW, $main) While True Sleep(100) WEnd Func EndProgram() GUIDelete($main) Exit EndFunc I used 2 differents pictures for 2 different buttons. I got just one button (second one on the place of first one, or maybe they are both there - stacked). Size of any picture doesn't exactly fit buttons. Is it bug, feature or is problem in me? Thx 4 answer.
-
JScript reacted to a post in a topic:
_GUIResourcePic.au3 (UDF) - Supports GIF animation using GDI+
-
_GUIResourcePic.au3 (UDF) - Supports GIF animation using GDI+
Bench replied to JScript's topic in AutoIt Example Scripts
Changing variable name $ghGDIPDll to $__g_hGDIPDll in whole _GUIResourcePic.au3 (18 occurences) helped. Now everything is OK. Thanx JScript for your very helpful UDF and you guinness thanx for your help. -
_GUIResourcePic.au3 (UDF) - Supports GIF animation using GDI+
Bench replied to JScript's topic in AutoIt Example Scripts
I also got error: _GUIResourcePic.au3"(166,16) : warning: $ghGDIPDll: possibly used before declaration. So I defined this variable as global in your UDF. I hope it is OK. -
_GUIResourcePic.au3 (UDF) - Supports GIF animation using GDI+
Bench replied to JScript's topic in AutoIt Example Scripts
What am I doing wrong? #AutoIt3Wrapper_Res_File_Add=Resources\autoit.png,rt_rcdata,LOGO #include "_GUIResourcePic.au3" $main = GUICreate("Test", 270, 132) $pic = GUICtrlCreatePic("", 30, 30, 210, 72) If @Compiled Then _GUICtrlPic_SetImage($pic, @ScriptFullPath&"|LOGO|rt_rcdata") Else _GUICtrlPic_SetImage($pic, "Resources\autoit.png", True) EndIf GUISetState(@SW_SHOW, $main) While GUIGetMsg() <> $GUI_EVENT_CLOSE Sleep(10) WEnd Exit or #include "_GUIResourcePic.au3" #include "logo.au3" $main = GUICreate("Test", 270, 132) $pic = GUICtrlCreatePic("", 30, 30, 210, 72) If @Compiled Then _GUICtrlPic_SetImage($pic, _logo(), True) Else _GUICtrlPic_SetImage($pic, "Resources\autoit.png", True) EndIf GUISetState(@SW_SHOW, $main) While GUIGetMsg() <> $GUI_EVENT_CLOSE Sleep(10) WEnd Exit File logo.au3 contains code, generated by CreateFilesEmbedded. Without compile it works OK. But I cannot use PNG picture nor as resource nor as generated code. Can you help me please? -
What about set state of this button to $BS_DEFPUSHBUTTON. Citation from help:
-
It working just inside the application, but I want to call my tray application from anywhere. For example - I am working in M$ Word and I want to use some hotkey to call my tray application. Got it?
-
I am creating some tray application and I want to run this tray application with some hotkey. So I need to register system-wide hotkey. I know there is some system call, which does this thing, but I am not friendly with Win API. Please, is here somebody, who can help me? Thanx.
-
Problem with script [Picture inside(at end)]
Bench replied to au3scr's topic in AutoIt General Help and Support
line 14: global$currentprogram = "" missing space: global $current... line 35: If $admin = 0Then missing space: ... 0 Then line 82: func_firefoxask () missing space: func _firefoxask () line 122: If$rounded > 1024 Then missing space: If $rounded ... line 130: If$ishide = 0 Then missing space: If $ishide ... line 142: $line = _GUICtrlEdit_GetLineCount ($output) - 1 there must not be underline between Edit and Get line 143: $Input=_GUICtrlEdit_GetLine($output,$line) there must not be underline between Edit and Get I got some error on line 67 (Subscript used with non-Array variable), because I have no install.ini file - there should be some test, if @error=1 then show message box with error. Be careful about spaces and underlines and everything should be better. -
Learner looking for help!, Func etc...
Bench replied to walle's topic in AutoIt General Help and Support
If Not FileExists("C:\Temp\Burnbuddy.ini") Then FileFolder() EndIf Start() -
Try function StringInStr.
-
I have a problem with AutoIt3Wrapper. In older versions (AutoIt 3.2.2) directive in source code didn't work, but .ini file works properly. Now I installed version 3.2.4.9, directives in source code still don't work and so .ini files. It works for icon but not for resources (version, author, copyright information) and so on. I tried to compile w/ right click and selecting "Compile using AutoIt3Wrapper", I built it from SciTe, I event ran it as standalone application and selected source code. I already have reshacker.exe in AutoIt3Wrapper directory. I really don't know, what I am doint wrong. My source lines look this way: #Region AutoIt3Wrapper directives section #AutoIt3Wrapper_icon=resources\Invertor.ico #AutoIt3Wrapper_outfile=.\Invertor.exe #AutoIt3Wrapper_compression=4 #AutoIt3Wrapper_allow_decompile=n #AutoIt3Wrapper_useupx=y #AutoIt3Wrapper_res_comment=Logical game for one player. Created with AutoIt v3. #AutoIt3Wrapper_res_description=Logical game #AutoIt3Wrapper_res_fileversion=1.2 #AutoIt3Wrapper_res_fileversion_autoincrement=n #AutoIt3Wrapper_res_legalcopyright=© 2006 James Bench #AutoIt3Wrapper_res_field=AutoIt version|3.2.4.9 #EndRegion My .ini file loks this way: [Autoit] aut2exe=C:\Program Files\AutoIt3\aut2exe\Aut2Exe.exe icon=resources\Invertor.ico outfile=Invertor.exe Compression=4 PassPhrase= Allow_Decompile=4 [Res] UpdateInformation=1 Comment=Logical game for one player. Created with AutoIt v3. Description=Logical game Fileversion=1.2 Fileversion_AutoIncrement=n LegalCopyright=© 2006 James Bench Field1Name=AutoIt version Field1Value=3.2.0.1 Field2Name= Field2Value= [Other] Run_AU3Check=y AU3Check_Parameter= Run_Before= Run_After= Can somebody help me please? I wanted to report it in Bugs section but I have no rights to start a new topic there. Thx 4 help.