Leaderboard
Popular Content
Showing content with the highest reputation on 08/23/2013 in all areas
-
GDI Slider
jaberwacky and one other reacted to davidkim for a topic
http://ho82.kr/au3/slide.swf Preview 1 Preview 2 slider download Download is valid until 2013/10/23 code #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=C:\AutoIt3\Aut2Exe\Icons\SETUP09.ICO #AutoIt3Wrapper_UseX64=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #Include <GDIPlus.au3> #Include <WindowsConstants.au3> #include <WinAPI.au3> #include <GUIConstantsEx.au3> Global Const $tagBITMAP = 'long bmType;long bmWidth;long bmHeight;long bmWidthBytes;ushort bmPlanes;ushort bmBitsPixel;ptr bmBits;' Global Const $SC_DRAGMOVE = 0xF012 Global $tick_back_png,$tick_hi,$tick_wi,$tick1_png,$tick2_png,$bu1_png,$bu2_png Global $tick = 295 ,$button = 0 Global $tx3 = 430 Global $y3 Global $bx3 Global $by3 = 341 Global $fDragging = False HotKeySet("{ESC}",'_exit_') _GDIPlus_Startup() _LoadTick() $tick_back_form = GUICreate('', 591, 395, -1, -1, $WS_POPUP, $WS_EX_LAYERED) GUISetState() setpng_back($tick_back_png,0) $tick_form = GUICreate("", 54, 55, 430 , 295,$WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $tick_back_form) GUISetState() setpng_tick($tick_form,$tick1_png) $button_form = GUICreate('', 54, 55, 50,341 ,$WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $tick_back_form) GUISetState() setpng_tick($button_form,$bu1_png) ; if form movement size display/move limit GUIRegisterMsg($WM_WINDOWPOSCHANGING, "WM_WINDOWPOSCHANGING") ;~ $SPI_GETDRAGFULLWINDOWS = 38 ;~ $SPI_SETDRAGFULLWINDOWS = 37 Global $result = DllStructCreate("int") ; system value backup DllCall("User32.dll", "int", "SystemParametersInfo", "int", 38, "int", 0, "ptr", DllStructGetPtr($result), "int", 0) ;windows move / mouse down and drag set value DllCall("User32.dll", "int", "SystemParametersInfo", "int", 37, "int", 1, "ptr", 0, "int", 0) While 1 _ReduceMemory(@AutoItPID) $aMsg = GUIGetMsg(1) Switch $aMsg[1] Case $tick_back_form Switch $aMsg[0] Case $GUI_EVENT_PRIMARYDOWN $fDragging = False ;no tick/button to $WM_WINDOWPOSCHANGING _SendMessage($tick_back_form, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) ;move can EndSwitch Case $tick_form Switch $aMsg[0] Case $GUI_EVENT_PRIMARYDOWN setpng_tick($tick_form,$tick2_png) ; Lamp ON $fDragging = True ; yes tick/button to $WM_WINDOWPOSCHANGING $pos = WinGetPos($tick_back_form,'') $tpos = WinGetPos($tick_form,'') $y3 = $tpos[1]-$pos[1] _SendMessage($tick_form, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) ; move can Case $GUI_EVENT_PRIMARYUP setpng_tick($tick_form,$tick1_png) ; Lamp OFF $fDragging = False EndSwitch Case $button_form Switch $aMsg[0] Case $GUI_EVENT_PRIMARYDOWN setpng_tick($button_form,$bu2_png) ; Lamp ON $fDragging = True ; yes tick/button to $WM_WINDOWPOSCHANGING $pos = WinGetPos($tick_back_form,'') $bpos = WinGetPos($button_form) $bx3 = $bpos[0] - $pos[0] _SendMessage($button_form, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) Case $GUI_EVENT_PRIMARYUP setpng_tick($button_form,$bu1_png); Lamp OFF $fDragging = False EndSwitch EndSwitch WEnd Func _exit_() DllCall("User32.dll", "int", "SystemParametersInfo", "int", 37, "int", DllStructGetData($result, 1), "ptr", 0, "int", 0) _GDIPlus_Shutdown() Exit EndFunc Func WM_WINDOWPOSCHANGING($hWnd, $Msg, $wParam, $lParam) If $hWnd = $tick_form And $fDragging = True Then ; move tick $pos = WinGetPos($tick_back_form,'') $tpos = WinGetPos($tick_form) Local $iY = $tpos[1] ; now Y Pos Local $iY_Min = $pos[1]+90 ; y min Local $iY_Max = $pos[1]+300 ; y max Local $stWinPos = DllStructCreate("uint;uint;int;int;int;int;uint", $lParam) Local $NowPosition = $pos[0]+$tx3 Local $iLeft = DllStructGetData($stWinPos, 3) Local $iTop = DllStructGetData($stWinPos, 4) setpng_back($tick_back_png,210-($iY_Max-$iY),1) ; move area calc $tick = 210-($iY_Max-$iY) ; Last Position Store If $iTop < $iY_Min Then DllStructSetData($stWinPos, 4, $iY_Min) If $iTop > $iY_Max Then DllStructSetData($stWinPos, 4, $iY_Max) If $iLeft <> $NowPosition Then DllStructSetData($stWinPos, 3, $pos[0]+$tx3) ; x position fixed EndIf If $hWnd = $button_form And $fDragging = True Then $pos = WinGetPos($tick_back_form,'') $bpos = WinGetPos($button_form) Local $iX = $bpos[0] ; now X Pos Local $iX_Min = $pos[0]+50 ; x min Local $iX_Max = $pos[0]+481 ; x max Local $stWinPos = DllStructCreate("uint;uint;int;int;int;int;uint", $lParam) Local $NowPosition = $pos[1]+$by3 Local $iLeft = DllStructGetData($stWinPos, 3) Local $iTop = DllStructGetData($stWinPos, 4) setpng_back($tick_back_png, 451-($iX_Max-$iX),2) ; move area calc $button = 451-($iX_Max-$iX) ; Last Position Store If $iLeft < $iX_Min Then DllStructSetData($stWinPos, 3, $iX_Min) If $iLeft > $iX_Max Then DllStructSetData($stWinPos, 3, $iX_Max) If $iTop <> $NowPosition Then DllStructSetData($stWinPos, 4, $pos[1]+$by3) ; y position fixed EndIf EndFunc Func _ReduceMemory($i_PID = -1) If $i_PID <> -1 Then Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID) Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0]) DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0]) Else Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1) EndIf Return $ai_Return[0] EndFunc ;==>_ReduceMemory Func setpng_back($png,$hper,$mode = 0) Local $graph, $hImage $hImage = _GDIPlus_ImageClone($png) $graph = _GDIPlus_ImageGetGraphicsContext($hImage) ; create memory blank area If $mode = 2 Then Set_Progress_W($graph,$hper,$tick_wi) Set_Progress_H($graph,$tick,$tick_hi) EndIf If $mode = 1 Then Set_Progress_H($graph,$hper,$tick_hi) Set_Progress_W($graph,$button,$tick_wi) EndIf _WinAPI_UpdateLayeredWindowEx($tick_back_form, _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage), 255, 1) _GDIPlus_GraphicsSetSmoothingMode($graph, 4) _GDIPlus_GraphicsDispose($graph) _GDIPlus_ImageDispose($hImage) EndFunc Func Set_Progress_W($graph,$ct,$png) _GDIPlus_GraphicsDrawImageRectRect($graph, $png, _ 0, 0 ,$ct,12, _ 70, 355 ,$ct ,12) EndFunc Func Set_Progress_H($graph,$ct,$png) _GDIPlus_GraphicsDrawImageRectRect($graph, $png, _ 0, $ct ,12,240-$ct , _ 450, $ct+95, 12 ,240-$ct) EndFunc Func setpng_tick($hForm,$png) Local $graph, $hImage $hImage = _GDIPlus_ImageClone($png) $graph = _GDIPlus_ImageGetGraphicsContext($hImage) _WinAPI_UpdateLayeredWindowEx($hForm, _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage), 255, 1) _GDIPlus_GraphicsSetSmoothingMode($graph, 4) _GDIPlus_GraphicsDispose($graph) _GDIPlus_ImageDispose($hImage) EndFunc Func _GDIPlus_ImageClone($hImage) Local $aResult = DllCall($ghGDIPDll, 'uint', 'GdipCloneImage', 'ptr', $hImage, 'ptr*', 0) If @error Then Return SetError(1, 0, 0) Else If $aResult[0] Then Return SetError($aResult[0], 0, 0) EndIf EndIf Return $aResult[2] EndFunc ;==>_GDIPlus_ImageClone Func _WinAPI_UpdateLayeredWindowEx($hWnd, $hBitmap, $iOpacity = 255, $fDelete = 0) Local $Ret, $tSIZE, $tPOINT, $tBLENDFUNCTION, $hDC, $hDestDC, $hDestSv $Ret = DllCall('user32.dll', 'hwnd', 'GetDC', 'hwnd', $hWnd) $hDC = $Ret[0] $Ret = DllCall('gdi32.dll', 'hwnd', 'CreateCompatibleDC', 'hwnd', $hDC) $hDestDC = $Ret[0] $Ret = DllCall('gdi32.dll', 'hwnd', 'SelectObject', 'hwnd', $hDestDC, 'ptr', $hBitmap) $hDestSv = $Ret[0] $tSIZE = _WinAPI_GetBitmapDimension($hBitmap) $tPOINT = DllStructCreate($tagPOINT) $tBLENDFUNCTION = DllStructCreate($tagBLENDFUNCTION) DllStructSetData($tBLENDFUNCTION, 'Alpha', $iOpacity) DllStructSetData($tBLENDFUNCTION, 'Format', 1) $Ret = DllCall('user32.dll', 'int', 'UpdateLayeredWindow', 'hwnd', $hWnd, 'hwnd', $hDC, 'ptr', 0, 'ptr', DllStructGetPtr($tSIZE), 'hwnd', $hDestDC, 'ptr', DllStructGetPtr($tPOINT), 'dword', 0, 'ptr', DllStructGetPtr($tBLENDFUNCTION), 'dword', 0x02) DllCall('user32.dll', 'int', 'ReleaseDC', 'hwnd', $hWnd, 'hwnd', $hDC) DllCall('gdi32.dll', 'ptr', 'SelectObject', 'hwnd', $hDestDC, 'ptr', $hDestSv) DllCall('gdi32.dll', 'int', 'DeleteDC', 'hwnd', $hDestDC) If Not $Ret[0] Then Return SetError(1, 0, 0) EndIf If $fDelete Then _WinAPI_DeleteObject($hBitmap) EndIf Return 1 EndFunc ;==>_WinAPI_UpdateLayeredWindowEx Func _WinAPI_GetBitmapDimension($hBitmap) Local $tObj = DllStructCreate($tagBITMAP) Local $Ret = DllCall('gdi32.dll', 'int', 'GetObject', 'int', $hBitmap, 'int', DllStructGetSize($tObj), 'ptr', DllStructGetPtr($tObj)) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0) EndIf Local $tSIZE = DllStructCreate($tagSIZE) DllStructSetData($tSIZE, 1, DllStructGetData($tObj, 'bmWidth')) DllStructSetData($tSIZE, 2, DllStructGetData($tObj, 'bmHeight')) Return $tSIZE EndFunc ;==>_WinAPI_GetBitmapDimension Func _LoadTick() $tick_back_png = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\tick_back.png') $tick_hi = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\tick_hi.png') $tick_wi = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\tick_wi.png') $tick1_png = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\tick_1.png') $tick2_png = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\tick_2.png') $bu1_png = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\bu_1.png') $bu2_png = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\bu_2.png') EndFunc2 points -
#include <IE.au3> Local $oIE = _IECreate("http://sj-sro.zapto.org/") $oForm = _IEFormGetCollection($oIE, 0) $oUser = _IEFormElementGetObjByName($oForm, 'username') $oPass = _IEFormElementGetObjByName($oForm, 'password') _IEFormElementSetValue($oUser, "username") _IEFormElementSetValue($oPass, "password") You were using _IEFormElementGetCollection when you should have been using _IEFormGetCollection to get the form, then you were trying to set the form to text which isn't going to work because you need to get the element first.2 points
-
Reschedule a task on fail?
adom reacted to stim100986 for a topic
Hello, I currently have a script that runs multiple SQL BIDS solutions throughout the day. The packages are et to run at approximately 1/2 hour intervals, as data sources are updated with data for previous day at different times of the day. Unfortunately, there is currently an issue with data delays at one of the data sources, causing a few packages to fail dut to table lockout (restricted user). We have a simple verification query that scheks last updated date from the source, and we are capturing and sending an email when this occurs. Our current woraround is to kill the script and run those packages manually later in the day, but this then has us playing catch up as the entire schedule falls behind even further. It is highly preferable for this data to be loaded at the time we currently have it scheduled, and our hope is the delay is only temporary. But in the meantime, we are hoping someone knows of a way to loop back and re-attempt an upload for a failed package without going manual the rest of the day. I hope this all makes sense to someone out there1 point -
LastSoul, Like this? #include <GUIConstantsEx.au3> ; Read file and convert @CRLF to "|" $sData = "|" & StringReplace(FileRead(@ScriptDir & "\12.txt"), @CRLF, "|") $hGUI = GUICreate("Test", 500, 500) $cList = GUICtrlCreateList("", 10, 10, 200, 200) GUICtrlSetData($cList, $sData) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd M231 point
-
FTP Download All Folders and Files
EKY32 reacted to michaelslamet for a topic
Whatever applications that change those FTP files have to maintain the text file If cant do it that way, dont use this method. Time stamp or size is another way, but it doesn't bullet proof. If we want to be sure that the file is same/different, we should use file checksum, IMHO.1 point -
in general, first you need to figure out how to do it by a registry change: http://www.thewindowsclub.com/set-chrome-default-browser-windows-8 then to implement it should be very easy. you can probably do it even with batch file, may prove much quicker and simpler in this case.1 point
-
Multi Dimension Array Question
michaelslamet reacted to UEZ for a topic
Try this: #include <Array.au3> $var1 = "arg11|arg12|arg13|arg14 " & @CRLF & _ "arg21|arg22|arg23|arg24 " & @CRLF & _ "arg31|arg32|arg33|arg34 " & @CRLF & _ "arg41|arg42|arg43|arg44 " & @CRLF & _ "arg51|arg52|arg53|arg54 " & @CRLF $Array = StringSplitW($var1, "|") _ArrayDisplay($Array, "My Array") ; #FUNCTION# ======================================================================================================================================== ; Name .................: StringSplitW() ; Description ..........: Splits a string into columns instead of rows as it is done by SplitString(), like a csv file to a 2d array ;-) ; Syntax ...............: StringSplitW($sString, $sDelimiter, $iWidthLen) ; Parameters ...........: $sString - string to split ; $sDelimiter - [optional] the delimter how to split the string ; $iWidthLen - [optional] length of the row (amount of columns - default is 256) ; Return values .......: Success - 2d array ; Error 1 - either $sString or $delimter is not set ; Error 2 - array width exceeded ; Error 3 - error splitting string ; ; Version .............: v0.96 build 2015-01-20 beta ; Author ..............: UEZ ; Modified ............: ; Remarks .............: RegEx take from http://stackoverflow.com/questions/4476812/regular-expressions-how-to-replace-a-character-within-quotes ; Related .............: StringSplit, StringReplace, StringRegExpReplace, StringLen, StringStripCR ; =================================================================================================================================================== Func StringSplitW($sString, $sDelimiter = ";", $sQuotationMark = '"', $sDummy = "¦", $iWidthLen = 256) If $sString = "" Or $sDelimiter = "" Then Return SetError(1, 0, 0) Local $chk, $iWidth, $i, $j, $k, $iLen, $iMax = 1, $iMaxWidth Local $aPos[1], $l = 0 Local $aSplit = StringSplit(StringStripCR($sString), @LF) If @error Then Return SetError(3, 0, 0) Local $aVertical[$aSplit[0]][$iWidthLen], $iDelimiterLen = StringLen($sDelimiter) - 1, $sLine For $k = 1 To $aSplit[0] $iLen = StringLen($aSplit[$k]) If $iLen > 1 Then $sLine = StringRegExpReplace($aSplit[$k], '(?m)\' & $sDelimiter & '(?=[^' & $sQuotationMark & ']*' & $sQuotationMark & '(?:[^' & $sQuotationMark & '\r\n]*' & $sQuotationMark & '[^' & $sQuotationMark & ']*' & $sQuotationMark & ')*[^' & $sQuotationMark & '\r\n]*$)', $sDummy) $chk = StringReplace($sLine, $sDelimiter, $sDelimiter) $iWidth = @extended If $iWidth > $iWidthLen Then Return SetError(2, 0, 0) If $iWidth >= $iMax Then $iMax = $iWidth + 1 Switch $iWidth Case 0 $aVertical[$l][0] = $sLine Case Else Dim $aPos[$iWidth * 2 + 2] $j = 1 $aPos[0] = 1 For $i = 0 To $iWidth - 1 $aPos[$j] = StringInStr($sLine, $sDelimiter, 0, $i + 1) - 1 $aPos[$j + 1] = $aPos[$j] + 2 + $iDelimiterLen $j += 2 Next $aPos[UBound($aPos) - 1] = StringLen($sLine) $j = 0 For $i = 0 To UBound($aPos) - 1 Step 2 $aVertical[$l][$j] = StringMid(StringReplace($sLine, $sDummy, $sDelimiter), $aPos[$i], $aPos[$i + 1] - $aPos[$i] + 1) $j += 1 Next EndSwitch $l += 1 EndIf Next ReDim $aVertical[$l][$iMax] Return $aVertical EndFunc Br, UEZ1 point -
first step find all forms in the page with $Forms = _IEFormGetCollection($oIE) read the @extended value to see how many forms are there if there is only one form then you can point to that by indexing 0 $MyTargetForm = _IEFormGetCollection($oIE, 0) if there are more forms, than you have to increment the index (0) till you point to your targhet form1 point
-
little tip on image mouse hover in GUI
Alexxander reacted to EKY32 for a topic
Well, I'm not sure this is what you want because the image you posted is not seen to me: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 243, 225, 192, 124) $Pic1 = GUICtrlCreatePic("c:\image1.jpg", 0, 0, 113, 105) GUICtrlSetTip(-1, "Image 1 tip") $Pic2 = GUICtrlCreatePic("c:\image2.jpg", 128, 0, 113, 105) GUICtrlSetTip(-1, "Image 1 tip") $Button1 = GUICtrlCreateButton("Exit", 80, 168, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $Button1 Exit EndSwitch WEnd1 point -
TreeView: Duplicate items with the same name
DucViet321 reacted to FireFox for a topic
Hi, It would be fine to create a simple GUI so that we don't have to do it, I mean a working example Br, FireFox.1 point -
Yep, that's wrong with the HotKeySet function? HotKeySet("^o", "test") While 1 Sleep(100) WEnd Func test() EndFuncBr, FireFox.1 point
-
Hi nobrainer 612 if you allow a bit of simplifications .... #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Date.au3> Global $Paused = True ; True or False Global $StartFrom = 5 ; how many seconds you want to countdown Global $Counter = $StartFrom ; Actual timer position AdlibRegister("Timer", 1000) $Form1_1 = GUICreate("Timer", 615, 393, 192, 124) $Label2 = GUICtrlCreateLabel("Timer: ", 40, 120, 49, 25) GUICtrlSetColor(-1, 0x008000) $Label3 = GUICtrlCreateLabel($StartFrom & " seconds", 136, 120, 80, 25) $Start_Button = GUICtrlCreateButton("Start Timer", 360, 120, 120, 33) $Stop_Button = GUICtrlCreateButton("Stop Timer", 488, 120, 120, 33) $Reset_Button = GUICtrlCreateButton("Reset Timer", 360, 160, 120, 33) $Resume_Button = GUICtrlCreateButton("Resume Timer", 488, 160, 120, 33) GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### Global $timer, $Secs, $Mins, $Hour, $Time, $current_left While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Start_Button StartTimer() #cs $finished = 5 $timer = TimerInit() AdlibRegister("Timer", 250) #ce Case $Stop_Button StopTimer() Case $Reset_Button ResetTimer() Case $Resume_Button ResumeTimer() EndSwitch WEnd Func Timer() If Not $Paused And $Counter > 0 Then $Counter -= 1 GUICtrlSetData($Label3, $Counter & " seconds") EndIf #cs _TicksToTime(Int(TimerDiff($timer)), $Hour, $Mins, $Secs) Local $sTime = $Time ; save current time to be able to test and avoid flicker.. if $finished - $Secs >= 0 Then ;MsgBox(0,"Stop",int(TimerDiff($timer))) GuiCtrlSetData($Label3, $finished - $Secs & " seconds") Else EndIf #ce EndFunc ;==>Timer Func StopTimer() $Paused = True #cs $timer= TimerDiff($timer) Global $dif = TimerDiff($timer) global $current_left = $finished - $Secs GuiCtrlSetData($Label3, $current_left & " seconds") ;MsgBox(0,"Stop",$dif) ;MsgBox(0,"Stop",$current_left) #ce EndFunc ;==>StopTimer Func ResetTimer() $Paused = True $Counter = $StartFrom GUICtrlSetData($Label3, $Counter & " seconds") EndFunc ;==>ResetTimer Func ResumeTimer() $Paused = False #cs $timer = $timer - $dif $timer = TimerInit() AdlibRegister("Timer", 250) _TicksToTime(Int(TimerDiff($timer)), $Hour, $Mins, $Secs) GuiCtrlSetData($Label3, $current_left & " seconds") if $current_left - $Secs >= 0 Then ;MsgBox(0,"Stop",int(TimerDiff($timer))) GuiCtrlSetData($Label3, $current_left - $Secs & " seconds") Else EndIf #ce EndFunc ;==>ResumeTimer Func StartTimer() $Paused = False $Counter = $StartFrom GUICtrlSetData($Label3, $Counter & " seconds") EndFunc ;==>StartTimer bye1 point
-
It was worth a read at least >> http://www.tutorialspoint.com/developers_best_practices/developers_best_practices_pdf.htm1 point
-
How about this: #RequireAdmin Local $RunDLLexe = 'rundll32.exe' Local $Parameters = @WindowsDir & '\system32\shell32.dll,Control_RunDLL ' & _ @WindowsDir & '\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"' & _ @WindowsDir & '\Resources\Ease of Access Themes\hc1.theme"' ShellExecuteWait($RunDLLexe, $Parameters, @SystemDir) Local $winClass = "[CLASS:CabinetWClass]" WinWait($winClass, '', 5) If NOT @error then WinClose($winClass)1 point
-
Send E-Mail via Lotus Notes
goodmanjl531 reacted to joeyman for a topic
Thanks for posting this! Do you know how to change it so that it will embed the document/picture with a preview on the email? I imagine it would be between these two lines: $AttachME = $MailDoc.CREATERICHTEXTITEM($filename) $EmbedObj = $AttachME.EMBEDOBJECT(1454, "", $fullpath, $filename) Also how can I send two attachments? Thanks!1 point -
Making a search box that gives query suggestions?
DucViet321 reacted to picea892 for a topic
Here is an autocomplete example using an ini file. You can use the exact same system for your purposes. I wasn't permitted to upload an ini file. So create "files.ini" in keeping with the below format and put in the same directory. [files] Schedules=c:\Schedule.xls About=c:\about.exe Timesheet=D:\Timesheet2009.xls Other=D:\other.xls Annual=D:\annual.xlsslickrun.au31 point -
how to get file full path of a process
BinaryBrother reacted to SmOke_N for a topic
This is based on something Larry wrote a while back:MsgBox(0, '', _ProcessGetLocation(@AutoItPID)) Func _ProcessGetLocation($iPID) Local $aProc = DllCall('kernel32.dll', 'hwnd', 'OpenProcess', 'int', BitOR(0x0400, 0x0010), 'int', 0, 'int', $iPID) If $aProc[0] = 0 Then Return SetError(1, 0, '') Local $vStruct = DllStructCreate('int[1024]') DllCall('psapi.dll', 'int', 'EnumProcessModules', 'hwnd', $aProc[0], 'ptr', DllStructGetPtr($vStruct), 'int', DllStructGetSize($vStruct), 'int_ptr', 0) Local $aReturn = DllCall('psapi.dll', 'int', 'GetModuleFileNameEx', 'hwnd', $aProc[0], 'int', DllStructGetData($vStruct, 1), 'str', '', 'int', 2048) If StringLen($aReturn[3]) = 0 Then Return SetError(2, 0, '') Return $aReturn[3] EndFunc1 point