Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/06/2015 in all areas

  1. Jon

    Forum Upgrade Status

    Forum updated to 4.0.12.1. Note the search tweak.
    2 points
  2. Hello. I've been recently experimenting with _WinAPI_SetWinEventHook and _WinAPI_RegisterShellHookWindow functions and this little script is the result of the experiment. It allows you to change window opening animations (still working on that), menu popup animations and some window behaviors (including wobbly effect while moving). Screenshots: Download: AutoItFX.zip
    1 point
  3. Yashied

    SciTE 3.5.5.101 for AutoIt

    This is my modification of the editor based on SciTE 3.2.5.99. Too many changes are made. Added new plugins (.lua) and rewrited existing, added Toolbar and Sidebar, expanded main and context menu, and more... I will not list all the changes, just download and try it. I also want to say a big thank the staff of Ru-Board for the excellent work on the modification of the editor and writing great plugins (.lua). Compiler Wrapper (CW) - a new tool that is part of SciTE 3.2.5.99 and designed to replace the AutoItWrapper. CW only works with "pragma" directives and does not use "AutoIt3Wrapper" directives. CW differs from AutoItWrapper both externally and internally but has a similar logic. Here are some possibilities utility - more friendly GUI, all options of "pragma" directives are located in one window, the ability to add digital signature, and a simple way to add resources (.rcs and .res files). The current version of CW is compatible with AutoIt 3.3.10.x, 3.3.12.x, and 3.3.14.x. How to install? Unpack CW to Compiler Wrapper folder and copy it to your SciTE or SciTE\Tools directory. Note that if you download SciTE 3.2.5.99 then you need not do anything because CW is already installed in the package. Command lines for SciTE: #Command line for compilation command.compile.au3="$(SciteDefaultHome)\Compiler Wrapper\CW.exe" "$(FilePath)" /m:1 /c:0 command.compile.subsystem.au3=1 #Command line for building (without GUI) command.build.au3="$(SciteDefaultHome)\Compiler Wrapper\CW.exe" "$(FilePath)" /m:1 /c:0 /s:1 command.build.subsystem.$(au3)=1 #Command line for changing "pragma" options only command.90.au3="$(SciteDefaultHome)\Compiler Wrapper\CW.exe" "$(FilePath)" /m:2 command.name.90.au3=Compiler Options... command.shortcut.90.au3=Shift+F7 command.subsystem.90.au3=1 command.save.before.90.au3=1 Command lines for Windows Explorer context menu: ;Command line for compilation "C:\Program Files (x86)\SciTE\Tools\Compiler Wrapper\CW.exe" "%1" /m:0 /c:0 ;Command line for building (without GUI) "C:\Program Files (x86)\SciTE\Tools\Compiler Wrapper\CW.exe" "%1" /m:0 /c:0 /s:1 Screenshots Files to download You can download latest SciTE build on this page (bottom of the post) or by using the SciTE Updater.
    1 point
  4. Hi everyone Are there any people here that know how to use a parser generator that uses 'bnf' (not 'ebnf'!) i'm using the gold parser: http://goldparser.org/index.htm not possible in autoit: https://www.autoitscript.com/forum/topic/167663-activex-gold-parser-in-autoit-is-this-possible/ What i'm looking for is the best way to parse a list: <List> ::= <Item> ',' <List> | <Item> <Item> ::= Number | String for example, the tree returned from: 'test', 1, 2is: since its not possible in AutoIT code I did it in vb script. this is what i did: ' in the parse loop: Case Rule_List_Comma set result = new list call result.input(.tokens(0).data,.tokens(2).data) ' the list class: class list private arg0 private arg1 public sub input(a,b) set arg0 = a set arg1 = b end sub private sub push(item,byref stack) redim preserve stack(ubound(stack) + 1) stack(ubound(stack)) = item end sub public function value value = array(arg0.value) value2 = arg1.value if isarray(value2) then for each thing in value2 push thing,value next else push value2,value end if end function end class is there a better way to do this? regards, TheAutomator
    1 point
  5. You need to copy & paste everything! There is an underscore at the end of the If line Jos
    1 point
  6. No clue on the Router one I have yet to hear any more about App Connector, beyond a vague response of: an "API Apps" that can connect to a wide array of data services applications and perform several Actions on behalf of the authenticated user." Cast to Device was called Play To in Windows 8.1. It was billed as a ChromeCast killer, but never really took off to my knowledge. I think it works with a small subset of HDTVs.
    1 point
  7. Those values are different system to system. Look at using _WinAPI_GetSystemMetrics() and one of the following indexes to obtain the correct value regardless of whether you're on 7/8/10 etc.
    1 point
  8. Windows sizes don't include all the chrome and title bars.
    1 point
  9. You could try with CDO. It would be something like this $sEML = "sample.eml" $sAttachment = "canada plane.jpg" $iSize = GetAttachmentSize($sEML, $sAttachment) If @error Then $sErrDesc = "You can't use this method because " Switch @error Case 1 $sErrDesc &= "CDO sucks for you." Case 2 $sErrDesc &= "getting stream failed." Case 3 $sErrDesc &= "loading EML failed." Case 4 $sErrDesc &= "of some dumb error." Case 5 $sErrDesc = "No such attachment exists." EndSwitch MsgBox(4096, "Error", $sErrDesc & @CRLF) Else MsgBox(4096, "...", 'Attachment named "' & $sAttachment & '" is ' & $iSize & " bytes big" & @CRLF) EndIf Func GetAttachmentSize($sEMLPath, $sAttachmentName) Local $oErrHandler = ObjEvent("AutoIt.Error", GetAttachmentSize) ; Red Jon fucked up COM Local $oMessage = ObjCreate("{CD000001-8B95-11D1-82DB-00C04FB1625D}") ; with all the downsides If @error Then Return SetError(1, 0, -1) Local $oMessageStream = $oMessage.GetStream() If @error Then Return SetError(2, 0, -1) $oMessageStream.LoadFromFile($sEMLPath) If @error Then Return SetError(3, 0, -1) $oMessageStream.Flush() ; this is essential Local $iSize For $oAttachment In $oMessage.Attachments If $oAttachment.FileName = $sAttachmentName Then $iSize = $oAttachment.GetDecodedContentStream().Size If @error Then Return SetError(4, 0, -1) If $iSize Then Return $iSize Next Return SetError(5, 0, -1) EndFuncIf you want the size of all attachments then just add up to $iSize inside the loop and remove second parameter.
    1 point
  10. I would definitely go with water's suggestion and find a program or library to do it. Doesn't have to be Outlook. There are a number of ways to include attachments and I'm not sure how reliable of a program you're going to get if you make a bunch of assumptions here. Just in case you want to do it anyway. First get this part: boundary="----=_Part_75_17152415.1274866451564"Use that to split the content in the file to get this: Content-Type: image/jpeg; name="canada plane.jpg" Content-Transfer-Encoding: base64 Content-Disposition: INLINE; filename="canada plane.jpg" /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcU FhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgo KCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAGrAoADASIA AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAIf you can reasonable assume base64, you can discard the header so you are left with this: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcU FhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgo KCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAGrAoADASIAEither decode that with base64 decoding and count the number of bytes in the output or guesstimate based on the length of the base64 string if that's good enough.
    1 point
  11. Outlook would be easy because my OutlookEX UDF has a function to do this: _OL_ItemAttachmentGet.
    1 point
  12. martin

    Detect window drag

    The message WM_ENTERSIZEMOVE is sent when the window start a move. Every time the window position changes a WM_MOVE message is sent, (assuming you have Desktop|View|Effectes | show windows contents while dragging checked). When the move stops because the mouse button is released a message WM_EXITSIZEMOVE is sent.By using the statement GUIRegisterMsg($WM_MOVE, "_FollowMe") it means the script will use the _FollowMe function every time the WM_MOVE message is received. If you see the whole window move while you drag it then I don't know why the child window doesn't move with my version.
    1 point
  13. I'm new to Autoit, and I have worked this project for 3 days , give me advice bro. First, you have 2 files, AutoUpdate.au3 and config.nht Here is the AutoUpdate.au3 #cs---------------------------------------------------------------------------------------------------------------------------------# Student manager project - Auto Updates Author : Nguyễn Huy Trường Yahoo Address : nht3004@yahoo.com Do not make illegal copy! #ce---------------------------------------------------------------------------------------------------------------------------------# #include <config.nht> #include <GuiEdit.au3> #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <WindowsConstants.au3> #include <String.au3> #include <Array.au3> #include <File.au3> ;########################################## These are some basic script to use ############################################### Func getValue($url) $fileDownloadable=InetGet($url, @ScriptDir&"\"&$dataFileName); If($fileDownloadable==1) Then $returnValue=FileRead(@ScriptDir&"\"&$dataFileName); Return $returnValue; ElseIf($fileDownloadable==0) Then Return -1; EndIf EndFunc Func alert($txt) MsgBox(0, $alertTitle, $txt); EndFunc Func readReg($regKey, $regName) Return RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\NHT3004\"&$regKey,$regName); EndFunc Func writeReg($regKey, $regName, $regValue) RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\NHT3004\"&$regKey,$regName,"REG_SZ",$regValue); EndFunc Func deleteReg($regKey, $regValue) RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\NHT3004\"&$regKey,$regValue); EndFunc Func progressBy($IDOfProgressBar, $valueToProgressBy) $aimValue=Execute($currentProgress+$valueToProgressBy); If($aimValue>=100) Then GUICtrlSetData($IDOfProgressBar,100); Else While $currentProgress<$aimValue GUICtrlSetData($IDOfProgressBar,Execute($currentProgress+$percentPerUp)); $currentProgress+=$percentPerUp; Sleep($speedOfUpdate); WEnd EndIf $currentProgress=$aimValue; EndFunc Func progressTo($IDOfProgressBar,$valueToProgressTo) If($valueToProgressTo>=100) Then GUICtrlSetData($IDOfProgressBar,100); Else While $currentProgress<$valueToProgressTo GUICtrlSetData($IDOfProgressBar,Execute($currentProgress+$percentPerUp)); $currentProgress+=$percentPerUp; Sleep($speedOfUpdate); WEnd EndIf $currentProgress=$valueToProgressTo; EndFunc Func downloadFile($fileDownloadLink, $fileDownloadName) Global $downloadProgress; $progressForm=GUICreate("Downloading updates...", 220, 50, 0, 0); $downloadProgress=GUICtrlCreateProgress(10, 10, 200, 20); GUICtrlSetColor(-1, 32250); GUISetState(@SW_SHOW); $downloadFileSize=InetGetSize($fileDownloadLink); $isDownloaded=InetGet($fileDownloadLink, $fileDownloadName, "", 1); While @InetGetBytesRead<$downloadFileSize; progressTo($downloadProgress, @InetGetBytesRead/$downloadFileSize*100); WEnd GUIDelete($progressForm);Aftet delete progressForm, plz set $currentProgress to 0; $currentProgress=0; Return $isDownloaded; EndFunc Func sizeOf($arrayName) SetError(0); $index=0; Do $pop=_ArrayPop($arrayName); $index+=1; Until @error=1; Return $index-1; EndFunc Func encode($txt, $pass, $lvl) Return _StringEncrypt(1, BinaryToString(StringToBinary($txt, $Flag_UTF8), $Flag_ANSI), $pass, $lvl); EndFunc Func decode($txt, $pass, $lvl) Return BinaryToString(StringToBinary(_StringEncrypt(0, $txt, $pass, $lvl), $Flag_ANSI), $Flag_UTF8); EndFunc ;########################################## End basic script programmed ###################################################### ;****************************************** Start main script of project ***************************************************** ;-------------------------------------------------Create a progress bar--------------------------------------------------- Global $updateProgress $progressForm=GUICreate("Checking for updates...", 220, 50, 0, 0); $updateProgress=GUICtrlCreateProgress(10, 10, 200, 20); GUICtrlSetColor(-1, 32250); GUISetState(@SW_SHOW); ;-------------------------------------------------Get new and old Version------------------------------------------------- $newVersion=getValue($linkCheckVersion);After getValue(), plz delete the file downloaded! progressBy($updateProgress,$percentPerAction); FileDelete(@ScriptDir&"\"&$dataFileName); If Not($newVersion==-1) Then progressBy($updateProgress,$percentPerAction); $currentVersion=readReg("SM","Version"); progressBy($updateProgress,$percentPerAction); $fileLink=getValue($linkCheckFileUrl);After getValue(), plz delete the file downloaded! progressBy($updateProgress,$percentPerAction); FileDelete(@ScriptDir&"\"&$dataFileName); $newFeatures=getValue($linkCheckNewFeatures);After getValue(), plz delete the file downloaded! progressBy($updateProgress,$percentPerAction); FileDelete(@ScriptDir&"\"&$dataFileName); progressBy($updateProgress,$percentPerAction); ;-------------------------------------------------Start check for updates------------------------------------------------- GUIDelete($progressForm);Aftet delete progressForm, plz set $currentProgress to 0; $currentProgress=0; If($currentVersion=="") Then writeReg("SM","Version",$projectVersion); Else If(Execute($newVersion)>Execute($currentVersion)) Then $downloadConfirm=MsgBox(1, "Alarm", "New version : "&$newVersion&" available."&@LF&"New features : "&@LF&$newFeatures&@LF&"Do you want to download?"); If($downloadConfirm==1) Then $downloadable=downloadFile($fileLink, $fileName); If($downloadable==0) Then alert("Can not download updates, please try again later!"); Else writeReg("PM","Version",$newVersion); alert("Updates downloaded successfully, click OK to Run Installation!"); Run($fileName); Exit; EndIf EndIf EndIf EndIf ;-------------------------------------------------End updates check------------------------------------------------------- Else progressTo($updateProgress,100); GUIDelete($progressForm); EndIf ;****************************************** End script of this project *******************************************************oÝ÷ Ø ÝêÞËay·(ø n+b²g«z~)^¶^rV«zØ^½ªâi¹^±«­¢+ØìQ¡ÍÍÉ¥ÁÐÝ¥±°±ÉͽµÙÉ¥±Ì()±½°ÀÌØí±ÉÑQ¥Ñ±ôÅÕ½Ðí±É´ÅÕ½Ðìí±Éѡѥѱ½5Í ½à ¤)±½°ÀÌØíÑ¥±9µôÅÕ½Ðíѹ¹¡ÐÅÕ½Ðìí±ÉÑ¡¥±¹µÑ¼ÍÙÝ¡¸¡¬ÙÉÍ¥½¸)±½°ÀÌØíÁɽ©ÑYÉÍ¥½¸ôÅÕ½ÐìĸÀÅÕ½Ðìí±ÉÑ¡ÙÉÍ¥½¸½Áɽ©Ð¥¸Í½¹½ÐÍÐ)±½°ÀÌØí¥±AÉ¥àôÅÕ½ÐíM5@ÅÕ½Ðìí±ÉÑ¡¥±¹µ½ÉÑ¡½Ð)±½°ÀÌØí¥±áѹͥ½¸ôÅÕ½ÐíáÅÕ½Ðìí±ÉÑ¡áѹͥ½¸½¥±)±½°ÀÌØí¥±9µôÀÌØí¥±AÉ¥àµÀìÅÕ½Ðì¸ÅÕ½ÐìµÀìÀÌØí¥±áѹͥ½¸í±ÉÑ¡¥±¹µ)±½°ÀÌØíÁɹÑAÉÑ¥½¸õ9ÕµÈ ÄÀÀ¼Ô¤í±ÉÑ¡ÁɹÑÑ¡Ð¥ÌÕÀÙÉäÑ¥½¸)±½°ÀÌØíÕÉɹÑAɽÉÍÌôÀí±ÉÑ¡ÁɽÉÍ̽½¥¹¹½Ñ¡¥¹)±½°ÀÌØí±¥¹­ ¡­YÉÍ¥½¸ôÅÕ½Ðí¡ÑÑÀè¼½ÝÝܹ¹¡ÐÌÀÀиÁ̹¹Ð½ÙÉÍ¥½¸¹¹¡ÐÅÕ½Ðìí±ÉÑ¡±¥¹¬Ñ¼¡¬¹ÜÙÉÍ¥½¸Ù±Õì)±½°ÀÌØí±¥¹­ ¡­¥±UÉ°ôÅÕ½Ðí¡ÑÑÀè¼½ÝÝܹ¹¡ÐÌÀÀиÁ̹¹Ð½¹ÝYÉÍ¥½¹¥±1¥¹¬¹¹¡ÐÅÕ½Ðìí±ÉÑ¡±¥¹¬Ñ¡ÐÕÍѼ½Ý¹±½¹ÜÁɽ©Ð)±½°ÀÌØí±¥¹­ ¡­9ÝÑÕÉÌôÅÕ½Ðí¡ÑÑÀè¼½ÝÝܹ¹¡ÐÌÀÀиÁ̹¹Ð½¹ÝÑÕÉ̹¹¡ÐÅÕ½Ðìí±ÉÑ¡±¥¹¬Ñ¡ÐÕÍѼ͡½Ü¹ÜÕÁѵÑÕÉÌ)±½°ÀÌØíÍÁ=UÁÑôÄí±ÉÑ¡ÍÁ¡µÌ¤½ ÕÀÁɽÉÍÌ)±½°ÀÌØíÁɹÑAÉUÀôÀ¸Ôí±ÉÑ¡ÁɹÐѼÁɽÉÍÌ Ñ¥µ)±½° ½¹ÍÐÀÌØí±}UQàôÐì)±½° ½¹ÍÐÀÌØí±}9M$ôÄì((칱ɥ¹oÝ÷ Ù.ë-ç¶×(è]4ÓK)j{-ÊW By the way, do not keep your eyes on Basic Functions, 'cause I paste them for all of my work! Have fun. PS: I'm newbie so there might be so much errors, please notify me if you see, thanks ^^! After download, rename config.nht.txt to config.nht AutoUpdate.au3 Config.nht.txt
    1 point
×
×
  • Create New...