Leaderboard
Popular Content
Showing content with the highest reputation on 07/01/2015 in all areas
-
There's one at the bottom of the main page for testing. Maybe I dismissed the Q&A function too quickly. I might enable it for a while on the 3 support forums. Hmm, it's difficult to apply to an old forum because the votes change the order of replies. We'd have to setup new forums that used that from the start for it to make sense.2 points
-
LAST VERSION - 3.8 03-Jul-12 This library contains the WinAPI functions are not included for unknown reasons to the native AutoIt WinAPI library. I use this UDF in nearly all of my programs, and decided to share it with the AutoIt community. I agree that over time some of these functions will be part of the native AutoIt library, but still... The library includes some undocumented, but useful functions (eg _WinAPI_GetFontResourceInfo()). The library also contains all the necessary constants to work with the appropriate functions. Most functions from this UDF intended for experienced users, but beginners will find the same lot of useful information for yourself. I will be to periodically add new functions to the library. The archive contains WinAPIEx library, and as usual an excellent examples from me. Some examples I took from this forum and to simplify them for better understanding. For those who use SciTE (full version) I have prepared the au3.userudfs.properties and au3.user.calltips.api files to highlight functions from this UDF in your scripts. Just copy this files to ...SciTEProperties and ...SciTEAPI, respectively. I hope this UDF will be useful for many as for me. I look forward to any feedback and suggestions. Maybe somebody wants to add new WinAPI functions? Credits Available functions Files to download WinAPIEx UDF v3.8 for AutoIt 3.3.6.1 Previous downloads: 27953 WinAPIEx UDF v3.8 for AutoIt 3.3.8.x Previous downloads: 148501 point
-
WKHtmlToX - AutoIt object/class to convert HTML files/pages into PDF and images
coffeeturtle reacted to Jefrey for a topic
Hi! I made this class because many of my AutoIt projects have to generate PDF files (logs, incomes...), and I always have to FileInstall() wkhtmlto*.exe and care about arguments, putting them in temporary folder then deleting it and many other always-the-same boring things. It's a class/object. It uses AutoItObject (which is already included). The wkhtmltopdf.exe and wkhtmltoimage.exe files are also included. All you must do to start using the class is including just the class file and instancing the class. Here's an example: #include "class\wkhtmltox.au3" Local $oObject = WKHtmlToX() $oObject.Input = "http://microsoft.com/" $oObject.Output = "microsoft.pdf" ; relative to current working dir $oObject.Convert() ; Now converting the same page into PNG $oObject.ToFormat = "png" $oObject.Output = "microsoft.png" $oObject.Convert()Help file included. Download file is just a redirect link because of the file size (14 MB because of wkhtmlto*.exe). The forum upload seems not to be working. Download full script (13,7 MB) AutoIt Forum Files: https://www.autoitscript.com/forum/files/file/343-wkhtmktox/ Dropbox: https://www.dropbox.com/s/xzw1l0b0y08mv8z/wkhtmltox.zip?dl=0 License info As wkhtmltopdf is LGPL, you can use it on a proprietary software, since you tell that you're using it (a link to http://wkhtmltopdf.org on the help files and About dialog would be cool...) Please check AutoItObject and CreateFilesEmbedded licenses: https://www.autoitscript.com/forum/topic/110379-autoitobject-udf/ and https://www.autoitscript.com/forum/topic/132564-createfilesembeddedau3-like-fileinstall/ This class is just a wrapper, so you don't need to tell anything about it on your app.1 point -
help - how can i make the script wait 5 minets ?
Sodori reacted to JLogan3o13 for a topic
I think water's post contains the point the OP should think through. WHY is the 5 minute wait necessary? Is it an arbitrary amount of time, or is he waiting for some sort of trigger (then conclusion of an application install, the appearance of a window, etc. etc) that usually takes about 5 minutes? Much better to code for the event than simply locking yourself into a long sleep. @OP the more information you can provide us, the more assistance we can provide you1 point -
I'm not interested in badges and I could fit my ego under my finger nail, the only thing the voting would be good for is people getting quicker answers when then come from a web search.1 point
-
If you mean the help file example then change _WinAPI_FlashWindowEx($hWnd, 2, $iFlashrate, $iTimeoutrate)To _WinAPI_FlashWindowEx($hWnd, 1, $iFlashrate, $iTimeoutrate)1 point
-
stackoverflow, AutoIt & Voting
JLogan3o13 reacted to iamtheky for a topic
All of this solves a problem that does not exist in 99% of the threads here. It mainly serves to satisfy ego, as does most all the other badging/rep bs on SO. Maybe you could make a 'like' store where I could trade them in for cool autoit merchandise, or even better it could keep being the official forum with a clean interface and leave the gimmicks aside. *this was actually intended for J1's post, but this thread took on much of the same discussion1 point -
I am sure you can do better! You can't expect anybody to give you a sensible reply without clearly stating what you want to do in detail, so stop asking these generic question and make it factual, jos1 point
-
Please stop posting with big fonts as that comes accross as shouting and explain what it is you want to do exactly, not a simple statement you made in your past 2 posts. jos1 point
-
Try this: Func _isnetalive() Local $sz_url = "http://www.google.com" ; <<<<<<<<<<< Local $u_flags = 0x00000001 Local $u_reserved = 0 Local $winnet = DllOpen("WinInet.dll") Local $Rsut = DllCall($winnet, "BOOL", "InternetCheckConnection", "str", $sz_url, "dword", $u_flags, "dword", $u_reserved) Return ($Rsut[0] <> 0) DllClose($winnet) EndFunc ;==>_isnetalive ConsoleWrite("Result:: " & _isnetalive() & @CRLF)1 point
-
@minx Oh , I think I mis-understood whole concept of up & down vote system. I think its a great way to select a best answer, instead of OP having to choose it like in the previous forum1 point
-
I see a useful to have this both feature Like is emotional - as we are comunity == live people - we need this. Vote is rational - showing you , which one was useful a little and wihch one was best answer == resolving @OP question.1 point
-
1 point
-
To me, it looks like it would be good for GHAS forum, but I'm unsure what is the reason for voting on the question.1 point
-
stackoverflow, AutoIt & Voting
tweakster2010 reacted to Jon for a topic
When they ruined the Best Answer feature in IPB4 they replaced it with a Q&A forum type where everything is classed as a question and people upvote/downvote answers and all that. Which is ok in theory but it doesn't really work if you have discussion mixed in. I'll flick the Test Posting forum into that mode to demo the effect. Do you actually want a chatroom? IPB comes with a built in chat room, but it's only 5 users by default (pay for extra) - so I only had it enabled for Mods. But there is a free chatbox modification that is available - I think it sits in the sidebar/bottom of the front page as a widget.1 point -
I have no idea exactly what it is you're doing so I could be off here. _WinAPI_FlashWindowEx1 point
-
Hmm last try $sRepl1 = stringregexpreplace($sFile , "(?s)(?<=//\[offstart\]).*?(?=//\[offend\])" , "")1 point
-
stackoverflow, AutoIt & Voting
minxomat reacted to jvanegmond for a topic
IPB forum is a poor Q&A tool when compared to SO. I strongly recommend its usage for AutoIt related questions. @OP, I am posting there under my real name.1 point -
Second Desktop - secure workspace with kiosk option
coffeeturtle reacted to RTFC for a topic
@coffeeturtle: Thanks a lot! Regarding your macro suggestion, I don' think that would work the way you think it would, as @compiled checks whether the current script is running as exe, and I'm checking from secondDesktop.au3/exe whether desktopSwitch is available as exe, not secondDesktop itself (which does not have to be compiled). I could have desktopSwitch check itself, but by then the second desktop would already be created, and the check was implemented as an early-out as soon as possible. But if I misunderstood your suggestion, feel free to elaborate.1 point -
FileReadLine() returns blank line [solved]
DoubleMcLovin reacted to BrewManNH for a topic
If you notice in my script I opened the same file twice at the same time. Once in read more and once in write mode. You won't cause an error by opening it more than once.1 point -
FileReadLine() returns blank line [solved]
DoubleMcLovin reacted to BrewManNH for a topic
First things first, if you're using a file handle, returned by FileOpen, and you're reading the lines one after the other from the file, you don't need the line number in your FileRead, and you don't need the FileCountLines function to count the lines in the file beforehand. Second, you can't read from a file with a file handle opened for writing, you need to open it for reading, and you need to open it again, with a different handle for writing. See below. #include <StaticConstants.au3> #include <File.au3> Global $i = 1 Local $listFileLocation = @ScriptDir & "\thisfile.ini" ;OpenFile $listFilewrite = FileOpen($listFileLocation, 9) ; Opened in write mode LogCheck($listFilewrite, -1, "Failed to open file :" & $listFileLocation) $listFileRead = FileOpen($listFileLocation) ; Opened in read mode LogCheck($listFileRead, -1, "Failed to open file :" & $listFileLocation) ;WriteLine $status = FileWriteLine($listFilewrite, "This line!" & @CRLF) LogCheck($status, 0, "Failed to write to $listfile:" & $listFileLocation) ; This whole section isn't needed ;CountLines ;~ Local $fileLines = _FileCountLines($listFileLocation) ;~ LogCheck(@error, 1, "Can't count lines for:" & $listFile) ;~ LogCheck($fileLines, 0, "No lines found for counting in:" & $listFile) Local $string ;Read Lines While 1 $string = FileReadLine($listFileRead) If @error = -1 Then ExitLoop LogCheck(@error, 1, "Cannot read line #" & $i) ; unnecessary, you should be checking for EOF and not for anything else. ConsoleWrite($i & ": " & $string & @CRLF) $i += 1 WEnd ;CloseFile $status = FileClose($listFilewrite) ; This should NEVER give you an error LogCheck($status, 0, "Failed to save $listfile::" & $listFileLocation) $status = FileClose($listFileRead) ; This should NEVER give you an error LogCheck($status, 0, "Failed to save $listfile::" & $listFileLocation) ;Used for consoleWriting errors. Func LogCheck($sendCode, $passValue, $errorString) Local $negate, $exit $negate = StringRegExp($passValue, "^\!.*") ? 0 : 1 Switch $negate Case 0 ;Negated statement $passValue = StringTrimLeft($passValue, 1) If Not ($sendCode = $passValue) Then $exit = 1 EndIf Case 1;Positive statement If $sendCode = $passValue Then $exit = 1 EndIf EndSwitch If $exit = 1 Then ConsoleWrite($errorString & @CRLF) If Not ($sendCode = "") Then ConsoleWrite(" Passed code: " & $sendCode & @CRLF) EndIf EndIf EndFunc ;==>LogCheck BTW, if you're using a real INI file, you should be using the Ini* functions instead of this.1 point -
Also, no, you didn't waste your time. It's good practise to re-implement a function without looking at the source. You may come up with a better implementation.1 point