-
Posts
13 -
Joined
-
Last visited
Everything posted by Thingy2nl
-
GUI with frames and Scrollbar issue.
Thingy2nl replied to Thingy2nl's topic in AutoIt GUI Help and Support
Managed to solve the issue. For some reason, I worked with the notion that frames were assigned 0 and 1... after changing to 1 for left and 2 for the right side.... it al started making a lot more sense. The fact that the handle for frame 0 was always invalid should have triggered me sooner.... Anyway, problem solved. Thanx for the response Melba and even more Thank You for you great UDF's and support in general! Thing -
Hi all, I am having some issues with a small proof of concept script. What this script will need to do in the end is monitor a directory for incoming jpg files. Pick them up and show them to the user while providing the using some options in the right frame ($iFrame_A, 1) for processing the selected jpg, then clear the screen and start monitoring again. The two issues i have now are: 1. I can only get GDI to display new images by performing a _GUIFrame_Switch. Turning off the main gui and turning it on again works, but that will blink the screen. So that is not an option. Is there something stupid i'm overlooking? 2. Whenever the number of pictures get to much for the screen size, I would like a scroll bar in the left frame ($iFrame_A, 0), but whatever i try, i can not get a scroll bar to show... again, probably something I am missing.... Anyone who can shed some light on this (esp Melba )? Short source: #Region Include #include <GDIPlus.au3> #include <File.au3> #include <GUIFrame.au3> #include <GUIScrollBars_Ex.au3> #EndRegion ; Use @DesktopWidth and @DesktopHeight for screen resolution Local $hMainForm2 = GUICreate("BIS Processing ", @DesktopWidth-200 , @DesktopHeight-200, 100, 100, BitOR($WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_SIZEBOX)) Local $iFrame_A = _GUIFrame_Create($hMainForm2, 0, @DesktopWidth-200-300) _GUIFrame_ResizeSet(0) ; Start monitoring for pictures ; Just use an fixed dir for now Local $JPGPath = "C:\Users\admin\Desktop\JPG" Local $JPGFiles = _FileListToArray( $JPGPath & "\", "*.jpg" ) _GDIPlus_Startup() GUISetState(@SW_SHOW, $hMainForm2) ; ; Need to use frame switching to force GDI to show pictures ; _GUIFrame_Switch($iFrame_A, 1) _GUIFrame_Switch($iFrame_A, 0) Local $hPic1 = GUICtrlCreatePic($JPGPath & "\" & $JPGFiles[1], 10, 10, 400, 255) _GUIFrame_Switch($iFrame_A, 1) _GUIFrame_Switch($iFrame_A, 0) Local $hPic2 = GUICtrlCreatePic($JPGPath & "\" & $JPGFiles[2], 10, 275, 400, 255) _GUIFrame_Switch($iFrame_A, 1) _GUIFrame_Switch($iFrame_A, 0) Local $hPic3 = GUICtrlCreatePic($JPGPath & "\" & $JPGFiles[3], 10, 540, 400, 255) _GUIFrame_Switch($iFrame_A, 1) _GUIFrame_Switch($iFrame_A, 0) Local $hPic4 = GUICtrlCreatePic($JPGPath & "\" & $JPGFiles[4], 10, 805, 400, 255) _GUIFrame_Switch($iFrame_A, 1) _GUIFrame_Switch($iFrame_A, 0) ; ; No scrollbar is showing, can this be done while using frames? ; local $setbar = _GUIScrollBars_Generate(_GUIFrame_GetHandle($iFrame_A, 0), 0, 1000) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd
-
Smtp Mailer That Supports Html And Attachments.
Thingy2nl replied to Jos's topic in AutoIt Example Scripts
My bad..... I should have included that I did change the lines like: $SmtpServer = "192.168.2.122" ; address for the smtp-server to use - REQUIRED $FromName = "me" ; name from who the email was sent $FromAddress = "bert@mylocaldomain.nl" ; address from where the mail should come $ToAddress = "henk@someexternaldomain.com" $Subject = "Subject" ; subject from the email - can be anything you want it to be $Body = "Message"; the messagebody from the mail - can be left blank but then you get a blank mail KAK...... $objEmail.ReplyTo = $s_ToAddress ; was $objEmail.To Might actually make a difference....... Never mind for now...... -
Smtp Mailer That Supports Html And Attachments.
Thingy2nl replied to Jos's topic in AutoIt Example Scripts
Gents, Sorry for being (or feeling like) a total noob, but I can't get this to work..... Copied the source from post 623. Downloaded and installed AutoIt v3.3.12.0 and BETA v3.3.13.9 Running the source completes normally (but does not work and I suspect some access issue) But while debugging, Alt+F5 from SciTE Version 3.4.4 Jul 13 2014 20:07:38 still gives me: >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "D:v3.4mail3.au3" /UserParams +>14:25:46 Starting AutoIt3Wrapper v.14.801.2025.0 SciTE v.3.4.4.0 Keyboard:00000809 OS:WIN_81/ CPU:X64 OS:X64 Environment(Language:0409) +> SciTEDir => C:Program Files (x86)AutoIt3SciTE UserDir => C:UsersadminAppDataLocalAutoIt v3SciTEAutoIt3Wrapper SCITE_USERHOME => C:UsersadminAppDataLocalAutoIt v3SciTE >Running AU3Check (3.3.13.19) from:C:Program Files (x86)AutoIt3Beta input:D:v3.4mail3.au3 +>14:25:46 AU3Check ended.rc:0 >Running:(3.3.13.19):C:\Program Files (x86)\AutoIt3\Beta\autoit3.exe "D:v3.4mail3.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop ### COM Error ! Number: 80020009 ScriptLine: 88 Description:At least one recipient is required, but none were found. It tell's me AutoIt3Wrapper.exe" /run /beta so I thought i was running the beta as advised in post 613... Am i still running the wrong Beta? If so, what should I replace by what other version (and were to get it...)... For context: I'm trying to get a script generate email's with attachments while the system has no network. Mails need to be collected and stored locally (hMailserver) and delivered to smtp relay for delivery once the system is at it's home station) Thanx -
The UDF itself is working perfectly. I use the resize option with some regulairity. It's just that now I need to convert a Nikon NEF to JPG, resize, add a border and dropshadow and then add the resulting jpg to a pdf.... Allmost all is working apart from the dropshadow. Would be great to get this UDF updated. It's about the only way to get some stuff done.... Even tried to use a runwait to get the dropshadow but that's also a dead end street.... So +1 from me to add the dropshadow....
-
I see that this a a somewhat older post, but I'm wondering, is the ImageMagickObject UDF still being used/maintained? I spend the last two days trying to get the dropshadow function added to the UDF... tried all sorts of combinations of commands like: $this.IMObj.Convert($image, _ ' " ', _ " ( ", _ "+clone", _ "-background", "yellow", _ "-shadow", "60x5+50+50", _ " ) ", _ "+swap", _ "-background", "white", _ "-layers", "merge", _ "+repage",' " ', $dest) All i want it to do is "convert _DSC0001rz.jpg ( +clone -background yellow -shadow 60x5+50+50 ) +swap -background white -layers merge +repage _DSC0001sh.jpg" but all al get is a large yellow shadow on a white background (yellow so i see what i'm doing...). The image is completely missing..... Started by copying the Func IM_Resize($This, Const $image, Const $dest, Const $resize) to Func IM_Shadow($This, Const $image, Const $dest) and takeing it from there.... but for th life of me i cant get it to work.... Or would it be possible to get this function correctly added to the udf by someone who knows what they are doing?
-
Hi, Not sure if anybody is interested, but I came across some questions about a wait screen to present to the user while the system is doing whatever needs to be done. I could not find something the was easy to use and stayed on screen while the script actually continues. So I came up with the follow.... maybe somebody will find it usefull. I started by getting a semi random wait animated gif. I use this one: Then I proceded to add the _GUIResourcePic.au3 from JScript found here: Finally i added 2 functions to my au3 like this: Func Wait( $WaitTime ) $smallform = GUICreate('', 214, 138, Default, Default, BitOR($WS_POPUP, $WS_BORDER), $WS_EX_TOPMOST) _GUICtrlPic_Create(".\processing.gif", 1, 1, 0, 0) GUISetState(@SW_SHOW, $smallform) sleep( $WaitTime) EndFunc Note the @smallform that I declare Global in a seperate au3 and the size settings 214, 138 that are the same size as the gif. Func EndWait() GUIDelete($smallform) EndFunc Now, when i know I am going to do something that will take some time, I call the Wait() function. That will open a new, borderless GUI telling the user to wait, and when done, turn off the GUI with the EndWait(). I added the variable sleep time because I have somoe functions that will take 4 or 5 seconds. To short to build the GUI and display it correctly, but to long not to show anything. In those cases I add additional 2 or 3 seconds waittime to give the GUI time to build and the user to actually see something. Secondly, I choose to rebuild and delete the GUI every time a I had some issues reusing just one GUI. The GUI would display, but the animated GIF was not shown on consecutive uses.... So, hope someone can use this to his advantage
-
kylomas, It's a good thing you are not within my reach for i might have to kiss you! With the first example from the link, i managed to solve my issue. In hindside it is pretty simple.... What I did is: Define 2 date formats, 1 that looks nice, 1 that i need to store my dates. Not sure about what the 0x1032 does, but will look into that tomorrow. $DTM_SETFORMAT_ = 0x1032 ;$DTM_SETFORMATW Global $sLongDate = "dddd dd MMMM yyyy" Global $sShortDate = "yyyy/MM/dd" Then send the date control to the gui and force is in the correct format from the start: $sShowday = GUICtrlCreateDate($sShowday, 444, 98, 281, 21) GUICtrlSendMsg($sShowday, $DTM_SETFORMAT_, 0, $sLongDate) Just before saving I change the date control to the format I need, read/save and change it back to the long format: GUICtrlSendMsg($sShowday, $DTM_SETFORMAT_, 0, $sShortDate) $var = IniWrite(@ScriptDir & "\Certificate.ini", "Show_date", "sShowday", GUICtrlRead($sShowday)) GUICtrlSendMsg($sShowday, $DTM_SETFORMAT_, 0, $sLongDate) By now, it is in the ini file in the correct format: [Show_date] sShowday=2013/01/13 And restoring is just reading it back like: $var = IniRead(@ScriptDir & "\Certificate.ini", "Show_date", "sShowday", "ERROR") GUICtrlSetData($sShowday, $var) Could defenately not have done this without that example.... So again, thank's for you help. Hope I can do the same for someone else someday.... Thingy
-
Look promessing.... gone dive right in..... Thank's for the link.
-
Kewl.... so i'm not completely of my rockers Thank's for trying to fix this. Let's hope someone has a solution. I allready though of placing multiple field over one another ans in stead of moving the date back to the original control, just show the overlapping field. But there has to be a simpler way....
-
The day does not have to be stored. I like the fact that the input control shows it, but in the end, I only need a date. It's just that i can't figure out how the store the date and then put it back into the original control to show the user that the date was read from file (and current settings are updated).
-
Kylomas, You are correct, this works, but how would I go about putting the date that was read from the inifile back into the $dte010 and update the GUICtrlCreateDate($sShowday, 10, 70, 250, 20) control?
-
Gents, As a complete n00b, i have been breaking my teeth on a, i presume, rather basic issue with a date variabele. It must be simple as I can't find an answer anywhere... and trust me, i've looked and googled but to no avail.... I am trying to build a pretty basic GUI that let's the user input some directory paths, radio buttons, list items, text fields and a date. No problem so far. Then the user can push a button to save thee settings, and all chooses are save to an ini file for later retrieval.... so far, still no problem... At some point in time, the user elects to load the ini file, and that's were i run into a mess with a date field... Here's what i do, i preselect the current date: Global $sShowday = @YEAR & "/" & @MON & "/" & @MDAY GUICtrlCreateLabel("Datum show", 332, 98, 168, 21) ;Datum show $sShowday = GUICtrlCreateDate($sShowday, 444, 98, 281, 21) User selects f.i. zaterdag 26 januari 2013 (as shown on screen. This format is not on purpose, but i do like it as it helps verifying the date. Most days will be sunday's. Willing to change is needbe) user selects to save: $var = IniWrite(@ScriptDir & "\Certificate.ini", "Show_date", "sShowday", GUICtrlRead($sShowday)) Ini reads: [show_date] sShowday=zaterdag 26 januari 2013 Then i try to read it back with: $var = IniRead(@ScriptDir & "\Certificate.ini", "Show_date", "sShowday", "ERROR") GUICtrlSetData($sShowday, $var) But this fails..... because $var is not in yyyy/mm/dd format. If i use: GUICtrlSetData($sShowday, "2014/01/01") It works fine. So the actual question is, how do i get the date that is saved, in the yyyy/mm/dd format.... I tried different way's to save like: $var = IniWrite(@ScriptDir & "\Certificate.ini", "Show_date", "sShowday", _DateCalc(GUICtrlRead($sShowday), "YYYYMMDD")) I tried different way's to input the date like: $sShowday = GUICtrlCreateDate($sShowday, 444, 98, 281, 21, $GUI_SS_DEFAULT_DATE) but so far nothing worked.... I just want to input a date, save it, read it back and put it back on the screen..... Any help or pointers or examples are very welcome.... Michiel