
wolfbartels
Active Members-
Posts
45 -
Joined
-
Last visited
wolfbartels's Achievements

Seeker (1/7)
0
Reputation
-
Monitoring the processes and their windows
wolfbartels replied to dwerf's topic in AutoIt General Help and Support
congratulations! it seems to work fine. -
Translate MWheel to {UP} and {DOWN}
wolfbartels replied to wolfbartels's topic in AutoIt GUI Help and Support
Hi PsaltyDS, I followed your advice, the event function Func _WM_MOUSEWHEEL in NOT called when the CAD window is active. After clicking anywhere on a GUI created by AutoIt the CAD window becomes not active and the scrolling in this non active window works fine. I suppose the problem has to do with GUIRegisterMsg. How can I force this registration for the CAD window, using AutoIt? Is there a way to detect the MsgID? Is it possible that the old fashioned CAD program supresses the event message? -
Translate MWheel to {UP} and {DOWN}
wolfbartels replied to wolfbartels's topic in AutoIt GUI Help and Support
I have a CAD application (Win 3.1) which I improved using an AutoIt script to add some buttons. This works fine. Now I want the content in the CAD window to scroll using the mousewheel. I added the following code (thanks to Melba23 and PsaltyDS): GUIRegisterMsg($WM_MOUSEWHEEL, "_WM_MOUSEWHEEL") ......... Func _WM_MOUSEWHEEL($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $lParam $hWnd = $hCAD ; <-- to force scrolling in CAD window! Local $iDirn = $SB_LINEDOWN If BitShift($wParam, 16) > 0 Then $iDirn = $SB_LINEUP _SendMessage($hWnd, $WM_VSCROLL, $iDirn) Return $GUI_RUNDEFMSG EndFunc ;==>_WM_MOUSEWHEEL There is only one problem, the content of the application window ($hCAD) scrolles only if the CAD window is not active, as soon as the CAD window is active the mousewheel is dead. How this can be fixed? -
Translate MWheel to {UP} and {DOWN}
wolfbartels replied to wolfbartels's topic in AutoIt GUI Help and Support
Thanks PsaltyDS and Melba23, it works fine, both ways, moving the mousewheel vertically or horizontally. Excellent. Now I'll try to translate these movements in Send ( arrow keys ). I want to teach mouse scrolling to an old Win95 parametric CAD program that knows only arrow keys. -
Translate MWheel to {UP} and {DOWN}
wolfbartels replied to wolfbartels's topic in AutoIt GUI Help and Support
Hi Melba23, That's looks interesting, although I do not understand how this technic works. Could you please show me some simple code where this is used, so that I can try to understand it? Thanks anyway, Wolf -
Hi, is it possible in an .au3 to detect the movements of the mouse wheel and translate these to corresponding {UP}s and {DOWN}s for use in Send() ??? I use a script to extend control of an old fashioned 16-bit program. I want to implement text scrolling with the mousewheel, as actually scrolling can be done only by using {UP} and {DOWN} keys. Thanks for any idea.
-
I found another 2 Locals that need to be initialized in Func _ImageGetInfoJPG($hFile, $nFileSize) in new image_get_info.au3 ver 2.7 line 145: Local $t, $nUnit I only tested with JPGs, it works fine now.
-
Hi Coding Cat, (not lazy anymore ) On JPG-files of some cameras there are both EXIF-Parameters "UserComments" and "Comment", causing the UDF _ImageGetParam() to become confused, because it searches only for Comment. An easy solution is to include the inicial @LF and final "=" at $aParam when searching in $aData. ;=============================================================================== ; Get param by name from function result ;=============================================================================== Func _ImageGetParam($sData, $sParam) Local $nParamPos = StringInStr(@LF & $sData,@LF & $sParam & "=") ; @LF and "=" added If $nParamPos Then $sData = StringTrimLeft($sData, $nParamPos + StringLen($sParam)) Return StringLeft($sData, StringInStr($sData, @LF) - 1) Endif Return "" EndFunc Now the Func will always give a correct Return. The attached photo is an example for testing this.
-
On JPG-files of some cameras there are both EXIF-Parameters "UserComments" and "Comment", causing the UDF _ImageGetParam() to become confused, because it searches only for Comment. An easy solution is to include the inicial @LF and final "=" at $aParam when searching in $aData. ;=============================================================================== ; Get param by name from function result ;=============================================================================== Func _ImageGetParam($sData, $sParam) Local $nParamPos = StringInStr(@LF & $sData,@LF & $sParam & "=") ; @LF and "=" added If $nParamPos Then $sData = StringTrimLeft($sData, $nParamPos + StringLen($sParam)) Return StringLeft($sData, StringInStr($sData, @LF) - 1) Endif Return "" EndFunc Now the Func will always give a correct Return.
-
This script works with unmodified include files with UDFs. descript.au3
-
Exactly, I am writing a script to write comments to JPGs. A very old tecnique, since DOS times, is to put the comment in a special file called 'descript.ion' in the same directory a the file itself. That works fine, but modern photo-viewers do not support this anymore, only Xnview and ACDSee Classic do as far as I know. That's why I'm looking for a way to put descriptions directly into the JPG file, precisely in EXIF data. Although in german, my script is easy to understand. (Sorry, the attached script needs a modified include file. Try the descript.au3 attached to the next posting, that works with available includes.) descred8ok.au3
-
Does somebody know how to write an EXIF Comment using an AUTOIT-script without using any external program?
-
@LazyCat Thanks a lot for the very useful image_get_info.au3 Probably after doing some changes, you did not define several variables. As I always use Opt("MustDefineVars",1) I had some problems. I added: In Func ParseExif($hFile, $exif_offset): Local $nTiffHdrOffset,$pHdr,$nIFDOffset,$pCnt,$nIFDCount,$pTag,$nCnt,$id,$nEIFDCount In Func _AddSpecial(ByRef $sInfo, $ID, $nValue): Local $nModeState In Func _IntR($nInt, $nOrder = 1): Local $curbyte and it works, as far as I tested, I tested only with JPGs. Do you know any UDF for adding/editing EXIF-Comments? I need this for a script I'm writing.
-
Hi, I wrote a script for adding/editing comments on fotos using the 'descript.ion' technic. Now I want to improve the script editing the EXIF comments, too. The UDFs in image_get_info.au3 only show the comments, but has no function for editing. Does anybody know about such a function? Thanks.
-
There is an active window with an Internet Browser open on a certain URL. Now I start an AutoIt-Script, how can it read the URL on the browser? The code should work with any browser, not just MS' Internet Explorer. Any ideas?