Leaderboard
Popular Content
Showing content with the highest reputation on 01/23/2015 in all areas
-
I started to work on this UDF and I'd like to discuss, test and improve it with other interested users. The idea is to create a UDF similar to FTPEx, but to support SFTP protocol. Given that this protocol is not natively supported by Windows, I found some candidates to manage it: cURL: http://curl.haxx.se/ PSFTP: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html FZSFTP: http://filezilla-project.org/ I'm trying to use the second one (realied by PuTTY team) and the result is the following code. It is not complete and needs to be widely tested, but main functions work and could be considered as a draft to start the discussion. A possible alternative could be to use FZSFTP (a modified version of PSFTP realized for FileZilla), that includes some interesting improvements to be used by external programs, but does not offer a related documentation. Code version: 1.0 beta 9 (not complete) Previous downloads: 132 SFTPEx.au31 point
-
KindEbook Price Query (old version)
jaberwacky reacted to TheSaint for a topic
This version has been discontinued. See the new version here. MANUAL MODE+ ONLY. No longer fully working automatically for price and adding new ebooks. NOTICE - As many of you are probably aware, internal links from the old forum are no longer working in many instances, which is apparently due to how those links were created in the first place. With that in mind, all the broken links here will not be fixed by me just yet, until some time has passed and a Forum rollback is no longer likely. Downloads should be working however, except when Jon may be updating or fixing something. Here's a simple little nifty program ... well it is for me ... and maybe you, if you like to keep tabs on a certain online store's prices for those ebooks you are interested in, but are not in your price range yet. BE AWARE - This is coded using AutoIt version 3.3.0.0, an oldy but goody, so it may need modification to run or compile with later or current AutoIt. Reportedly not at this point, as all seems fine. BE ADVISED - This is not affiliated or supported or likely appreciated or even recommended by them &/or Partners. As always, use my stuff at your own risk, and I seriously suggest you check out my disclaimer on my Toolbox page (see my signature below). Basically, I haven't tested this much yet, as it is hot off the press, and no prices have changed yet for me to give the ultimate definitive test, but it should work ok ... until they change an important element that the program relies on. I've kept it pretty basic and simple, and others are welcome to add improvements, just so long as they respect me, and share here. This program is only allowed to be shared (made available for download) from the AutoIt Examples forum, until I give permission otherwise. What does it do? It is a simple database, that you populate using web page links from a certain store for their ebooks. I just got mine off my Wishlist pages. It keeps a record of up to four prices for each ebook. Title, Author (or Editor), URL, Price (Start, Current, Lowest, Highest), Date (Start, Last Check), are all stored in the program's INI database. Also, what I am presuming is the ISBN, which is used to make each entry unique. If a price has changed since Start, it will be indicated by an asterisk in the number (first) column. Why? Seller, Publishers and even Authors on occasion, like to play games with ebook prices. Hopefully this little tool, will even the odds in our favor, maybe even put us in front. OLDER NEWS (relocated to 2nd post) NEWS (15-06-2015) The program no longer works for price and that element may remain broken. It does however still assist with any current ebooks on the list, and I may add the ability to add more ebooks, and manually paste the current price, etc. Not all is lost. (15-06-2015) I have coded a partial fix, which allows you to manually enter (copy & paste) prices. (16-06-2015) Ebooks can now be added manually. (17-06-2015) More improvements. IMPORTANT - Please update from v1.1 to v1.2 or later, due to a Query bug. WARNING - Before running v1.6 (and later) for first time, you may want to read all notes. IMPORTANT - Before downloading this latest update, or if using it already, please make yourself familiar with some later information here. It may even be better to just wait for the next update, and not use this one. (v3.4) For those who have not kept up with updates since v2.0. KindEbook Price Query.au3 Previously: 113 + 78 downloads KindEbook Price Query v3.4.zip Previously: 151 + 57 downloads (v3.5) For those who have kept up with updates. KindEbook Price Query.au3 KindEbook Price Query v3.5.zip (v3.6) For those who have kept up with updates & First time users. KindEbook Price Query.au3 KindEbook Price Query v3.6.zip (v3.7) For those who have kept up with updates & First time users. KindEbook Price Query.au3 Previously: 30 downloads KindEbook Price Query v3.7.zip Previously: 31 downloads (v3.8) For those who have kept up with updates, but not First time users yet. Sources included in the zip file. PARTIAL FIX KindEbook Price Query v3.8.zip Previously: 32 downloads (v3.9) For those who have kept up with updates, and First time users. Sources included in the zip file. MANUAL MODE KindEbook Price Query v3.9.zip Previously: 26 downloads (v4.0) For those who have kept up with updates, and First time users. Sources included in the zip file. MANUAL MODE+ KindEbook Price Query v4.0.zip Previously: 28 downloads IMPORTANT - See this post for extra INI entries to improve web page read for Summary (prior post explains). RECOMMENDED - Users could maybe benefit from reading various comments in Intercept Right-Click Listview Context Menu topic. CHANGES (17-06-2015) (v4.0) MANUAL MODE, but with some more automation. A Query ALL can now start at the currently selected entry, via a prompt. An option to auto close current browser tab (using Ctrl + W), has been added for when getting price in manual mode. Input Box window widened slightly in ADD Ebook manual process. A delay option has been added, to allow a pause for specified seconds between queries during a Query ALL. This delay may be helpful in preventing erroneous detection as a malicious scraper. Ebook cover can now be a .jpg file, in the Image Data folder, where filename matches ISBN ID. Bugfix for whitespace in Price in manual mode (sorry about that). (16-06-2015) (v3.9) MANUAL MODE only for prices and adding ebooks. Program can now have ebooks added to it manually, when in 'manual' mode. The Timer and Wait labels are now dealt with correctly, by being hidden when not required or wanted. An Input Box is continually presented for user to manually add an Ebook's details (Title, etc). No other fix has been added yet, to deal with broken status in regard to automatic price checking. That last, also includes not automatically getting details when adding ebooks. I may do that next. (15-06-2015) (v3.8) PARTIAL FIX - Manual Price adding only. Program is broken as far as getting prices automatically from Amazon, but a 'manual' mode has been added, and set by default, but can be reset to 'automatic' in program settings. The manual mode allows you to do your usual Query (one or ALL), and presents you with an Input box to manually paste the price you have copied from the ebook webpage that has been executed. You can stop at anytime, by clicking the Cancel button. The usual Report will be displayed and any changes stored. NOTE - You cannot currently ADD any new ebooks to the list with this version, but I will address that issue soon. (13-06-2015) (v3.7) NO LONGER WORKING FOR PRICE AND ADDING NEW EBOOKS. A major update that resolves a bug, and perhaps made v4.0 (as originally planned) redundant. Bugfix for Timer Label causing a miscount of control numbers when swapping users in certain scenario. Prompt when making a Query from relocated bought ebooks user. Private Comments are now queried when copying or moving an ebook to another user, if they exist for that ebook. All Shared Comments are now stored and read from the shared file 'Comments.ini', though they still also exist in each user file for now, if no longer referenced or updated there. Any conflicts during this updating change, between users, meant comments were combined but separated by a pipe '|' character. Still advise you read v1.6 notes. PREVIOUS VERSIONS (relocated to 2nd post) NOTE - See extra comments at Post #13. IMPORTANT This program is based on settings in that store, that are relevant to me as a customer from AUS. It also relies on a leading dollar sign at the start of each price (and other currency entry listed in INI file), which is removed during comparisons. I did not remember to include the pound sign, so if you need to, modify the source code. That last will definitely be necessary for others from other countries. I'll add any currencies advised of, in the next update. It is simple enough to change, and I may just make an INI entry, that can be modified by whoever, to suit. ADDENDUM - Relocated to Chat topic. NOTE - This program was initially considered and talked about in this Chat topic. SCREENSHOTS v3.5+ Earlier OLDER (v3.4)1 point -
1 point
-
First you will need to register a context menu to right click with something like this ;-------------------------------------- Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\mv] @="Move to dedicated folder" [HKEY_CLASSES_ROOT\*\shell\mv\command] @="pathto\\my.exe %1" ;-------------------------------------------1. then in the begining of your script $CmdLine[1] will be the full path of the file name you want to control ]If $cmdline[0] > 0 Then $file2move=$CmdLine[1] EndIf2. compile the script to "my.exe" place it in "pathto=the location it will be" 3. test it out1 point
-
1. Don't, that's poor form, relying on a context menu not being interrupted by another app. 2. Use _FileListToArray(), work out the extensions you want to list 3. DirMove()/FileMove() will allow you to rename a folder/file 4. DirMove()/FileMove() will allow you to move a folder/file (and rename it) No more "Don't know how's now" (10's of thousands of examples of all)1 point
-
Should be poassible. To get a start activate the macro recorder in Word and do 1. to 3. That will be a good starting point to translate to AutoIt.1 point
-
It is called age and maturity, my friend. Or was it age and senility? I sometimes forget. Oh well. Where did I set down my donut?1 point
-
1 point
-
My function is a bit different, because it returns only a visible Window. You can try this code, it should return different values for the two functions : #include <WinAPI.au3> $hPriorActiveWindow = _WinAPI_GetWindow(WinGetHandle("[ACTIVE]"),$GW_HWNDNEXT) $aPos = WinGetPos($hPriorActiveWindow) ConsoleWrite("# Previous Window with _WinAPI_GetWindow: " & @CRLF & "HWND = " & $hPriorActiveWindow & @CRLF & "Title = " & WinGetTitle($hPriorActiveWindow) & @CRLF) ConsoleWrite("Size : x=" & $aPos[0] & "; y=" & $aPos[1] & "; w=" & $aPos[2] & "; h=" & $aPos[3] & @CRLF & @CRLF) $hPreviousWindow = _WinGetNextWindow("[ACTIVE]" , "", 2) $aPos = WinGetPos($hPreviousWindow) ConsoleWrite("# Previous Window with _WinGetNextWindow: " & @CRLF & "HWND = " & $hPreviousWindow & @CRLF & "Title = " & WinGetTitle($hPreviousWindow) & @CRLF) ConsoleWrite("Size : x=" & $aPos[0] & "; y=" & $aPos[1] & "; w=" & $aPos[2] & "; h=" & $aPos[3] & @CRLF) ; #FUNCTION# ==================================================================================================================== ; Name ..........: _WinGetNextWindow ; Description ...: Retrieves a handle to the next or previous visible window in the Z-Order. ; Syntax ........: _WinGetNextWindow($vWindow[, $sText = ""[, $iCmd = 0]]) ; Parameters ....: $vWindow - The title/hWnd/class of the window. See Title special definition. ; $sText - [optional] The text of the window to check. Default is an empty string. See Text special definition. ; $iOrder - [optional] Indicates whether the function returns a handle to the next window or the previous window. ; This parameter can be either of the following values : ; $GW_HWNDNEXT (2) : Returns a handle to the window below the given window. ; $GW_HWNDPREV (3) : Returns a handle to the window above the given window. ; Return values .: Success - Returns a window handle ; Failure - Returns 0 and sets @error flag to non-zero on error ; Author ........: jguinch ; Remarks .......: If the specified window is a topmost window, the function searches for a topmost window. ; If the specified window is a top-level window, the function searches for a top-level window. ; If the specified window is a child window, the function searches for a child window. ; Link ..........: ; =============================================================================================================================== Func _WinGetNextWindow($vWindow, $sText = "", $iCmd = 2) Local $hWnd = $vWindow, $aGetWindow If NOT IsHWnd($vWindow) Then $hWnd = WinGetHandle($vWindow, $sText) If $hWnd = 0 Then Return SetError(2, 0, 0) If NOT IsDeclared("GW_HWNDNEXT") Then Local Const $GW_HWNDNEXT = 2 If NOT IsDeclared("GW_HWNDPREV") Then Local Const $GW_HWNDPREV = 3 If $iCmd <> $GW_HWNDNEXT AND $iCmd <> $GW_HWNDPREV Then Return SetError(3, 0, 0) While 1 $aGetWindow = DllCall("User32.dll", "hwnd", "GetWindow", "hwnd", $hWnd, "uint", $iCmd) If @error Then Return SetError(4, 0, 0) If $aGetWindow[0] = 0 Then ExitLoop $hWnd = $aGetWindow[0] $aGetWindowLong = DllCall("User32.dll", "long", "GetWindowLong", "hwnd", $hWnd, "int", -16) If @error Then ExitLoop If NOT BitAND(WinGetState($hWnd), 2) OR $aGetWindowLong[0] < 0 Then ContinueLoop Return $hWnd WEnd Return SetError(1, 0, 0) EndFunc1 point
-
CharLowerBuff for StringLower
czardas reacted to jvanegmond for a topic
Sure, there is value in moving the native AutoIt functions to UDFs, under the right circumstances and for the right reasons. What we could do is move basic AutoIt functions to UDFs. GUI, Strings, networking (TCP/UDP), etc. then include it all together in a compatibility library which older scripts can include as they migrate to the new version. Currently the main benefit of doing that is that we open source the UDFs so everyone can work on them, and I'm sure that if you built a GUI or networking UDF which is backwards compatible and better than the current native implementation, we'd definitely use it. For strings, AutoIt is obviously too slow to make that sort of transition useful right now. Though I haven't measured it, I assume that even a single DllCall will be an order of magnitude slower than a call to the native StringLower. We have been debating about whether we should build a compiler for AutoIt for as long as I've been a member on these forums mainly for the speed benefit, and if we did, strings would definitely be up for inclusion in a backwards compatibility library.1 point -
Do you plan on adding support for any other sites than Amazon? I am rather fond of Smashwords. --Edit-- Silly me. I just realized you have the source code link right above the application link. I'll let you know if I get Smashwords working on my end.1 point
-
An example file is always better... here is one remember to fill in these lines: Global $sServerName = "server name" ; ==> fill in Global $sUsername = "user name" ; ==> fill in Global $sPassword = "user password" ; ==> fill in Global $iServerPort = 22 ; ==> fill in optionally, default should be 22, not 0 as far as i know Global $cRemoteDir = "/some remote paths" ; ==> fill in and create a 'test.txt' file in your script folder. Update 12/12/2013 cleanup up example SFTPEx example - Generic.au31 point
-
Write to Console for GUI-Based Applications
MuffettsMan reacted to wraithdu for a topic
EDIT - better solution. Neat idea. Here's without the batch file. It gets a little funny if you're dealing with command line params, but you get the idea. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=Example.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;Consolewrite for GUI-Based Apps Example by DJKMan Global $DEBUG = True If $DEBUG Then _ConsoleDebugRun() Func _ConsoleDebugRun() DllCall("kernel32.dll", "handle", "CreateMutexW", "ptr", 0, "bool", 1, "wstr", "AutoItDeveloperConsoleMutex") If @error Then Return SetError(1) Local $lastErr = DllCall("kernel32.dll", "dword", "GetLastError") If @error Then Return SetError(2) If $lastErr[0] <> 183 Then ; ERROR_ALREADY_EXISTS Run(@ComSpec & ' /c @echo off && title Example System - Developer Console && prompt $G && color 03 && "' & _ @ScriptFullPath & '" ' & $CmdLineRaw & ' | ' & @ComSpec & ' /Q') Sleep(3000) ; give time to launch child Exit EndIf EndFunc Local $sleep=3000 ConsoleWrite("echo Hello World!" & @LF) ;Echo first line. While 1 $randomnumber = Random(1, 5, 1) ConsoleWrite("echo Random Number: " & $randomnumber &@LF);Echo random number to console ConsoleWrite("echo ---Sleeping: "&$sleep&"---"&@LF) Sleep($sleep) WEnd1 point