Strange behaviour
AutoIT scripting resource needed
Hi all,
First off my apologies if this is not the right place for this post, I couldn’t find the relevant forum section if there is one. Please move it accordingly.
Our small(ish) company is running a project to automate data collection from a number of web sites. All code is done in AutoIT since websites do not provide any programmable way to get the data like XML, so we have to deal with web pages, click buttons, select options / drop downs etc. The data is then printed to PDFs and moved to other processes.
The project is at the stage where proof of concept has been built by yours truly, and we now need to put some more resources on it to get past the first 3-4 sites. Target is 30-40 sites, however most tend to change web page layout here and there, move buttons around a bit etc. Because of this, even if initial development is ever completed (we always can add more sites , expand functionality etc.), we’ll need sufficient resources to maintain the code in production. Therefore we don’t have an end date for this assignment.
This is where you come in: Proficient in AutoIT, have extra time on your hands (30+ hours / week), and can work remotely. We are based in San Diego but you can be anywhere, as long as your hours roughly overlap with mine so we can communicate effectively and move the project forward.
If you are interested please drop me a PM (I hope that works with 1 post on the forum) with :
- Your availability (number of hours / week, min / max), for how long and will this change over time
- Your expected rate / hour
- Whether you can work during our regular business hours (Pacific time zone, 9AM - 5PM), if not then your preferred hours
- General info on your background, as relevant to this project
I’ll take a look at your previous achievements on the forum and will make a decision within a few days.
I hope I haven’t missed anything, please reply to this post if I have and I’ll clarify it for everyone.
Many thanks!
Salted Password Hashing
Hi,
I'll post here because this script involved many language...but not Autoit
I'll explain better, in this forum i don't have found any example of salted password hashing, on the web there are in every language existing, C, C++, C#, Java, PHP etc. Someone use the PBKDF2, scrypt, or bcrypt library or custom function
Since i don't have found nothing in my language and english is not my best friend, after many research i'm here to "revise" this code for autoit:
#include <Crypt.au3> $aPass = "My Password" ; testing purporse $aHash = _HashPassword($aPass) MsgBox(0, "Crypted", $aHash) If _CheckPassword($aPass, $aHash) = True Then MsgBox(0, "Decrypted", "Well done") Else MsgBox(0, "Wrong Password", "Something goes wrong") EndIf Func _HashPassword($inPwd, $inSalt = "", $sDelimitator = "|", $inSalt_Number = 64) Local Const $CALG_SHA512 = 0x0000800e Local $sSalt, $sHash, $sPassword Local $sPassword = StringStripWS($inPwd, 3) Local $aSalt = StringSplit("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", "") If $inSalt = "" Then For $i = 1 To $inSalt_Number $sSalt &= $aSalt[Random(1, $aSalt[0], 1)] Next Else $sSalt = $inSalt EndIf _Crypt_Startup() $sHash = $sPassword & $sSalt For $i = 1 To 256 $sHash = _Crypt_HashData($sHash, $CALG_SHA512) If $sHash = -1 Then Return SetError(-1, 0, 0) Else $sHash = StringMid($sHash, 3) EndIf Next _Crypt_Shutdown() Return $sHash & $sDelimitator & $sSalt EndFunc ;==>_HashPassword Func _CheckPassword($inPwd, $inHash, $sDelimitator = "|") Local $sHash, $sSalt $aHash = StringSplit($inHash, $sDelimitator) If Not IsArray($aHash) Or $aHash[0] <> 2 Then Return SetError(1, 0, 0) $sHash = $aHash[1] $sSalt = $aHash[2] If _HashPassword($inPwd, $sSalt, $sDelimitator) <> $inHash Then Return SetError(2, 0, 0) Return True EndFunc ;==>_CheckPassword
This is the result:
4D3F6DA9EB0F1FE9B80291A34AC104C28F07E8D6918A6F35EB95EFE47CE7BE79707ACCED7F05DF55095B61CEB1BE15A558CF6D8A893C919EA1A153A14DF3C66D|COiJhdR1tlHKK3IBGup1BunLOn0GweNkzw40OzPtNBazhMjAHontKRdKNFiujW8N
Isn't to easy to remove the "salt part"? It change everytime, the delimenter | can be a "custom" delimenter but the string is too easy to recognize:
|COiJhdR1tlHKK3IBGup1BunLOn0GweNkzw40OzPtNBazhMjAHontKRdKNFiujW8N
After removing the salt, is only a SHA-2, yes safer but the salt is useless in the code. Maybe i can remove the delimeter and use StringRight($inSalt_Number) instead of StrinSplit() and use _Crypt_HashData also on the salt for make an "homogeneous" string?
So please someone more expert the me can check if the code is good or not, if there are mistake or any suggestion are accepted
SciTE LineJumper
I hate using the arrow keys to go up or down several lines and especially loathe having to use the mouse. Which is what I usually do after I've hit the down arrow fifteen times. So, I cooked up this lua script which will jump the curser the indicated amount of lines either up or down.
With this installed and SciTE reloaded simply press [ctrl] + [1] through [5]. This will jump the cursor from one to five lines in the document from its current position. To go the other way then press [ctr] + [alt] + [1] through [5]. I can add more if you think it would be necessary. Forgot to mention that this only works with the number pad.
To use this just place the following lua file in the "...\AutoIt3\SciTE\LUA" directory.
LineJumper = EventClass:new(Common) function LineJumper:OnKey(key, shift, ctrl, alt) local lines = 0 if ctrl == true and alt == false then if key == 97 then lines = 1 LineJumper:LineJump(lines) elseif key == 98 then lines = 2 LineJumper:LineJump(lines) elseif key == 99 then lines = 3 LineJumper:LineJump(lines) elseif key == 100 then lines = 4 LineJumper:LineJump(lines) elseif key == 101 then lines = 5 LineJumper:LineJump(lines) end elseif ctrl == true and alt == true then if key == 97 then lines = -1 LineJumper:LineJump(lines) elseif key == 98 then lines = -2 LineJumper:LineJump(lines) elseif key == 99 then lines = -3 LineJumper:LineJump(lines) elseif key == 100 then lines = -4 LineJumper:LineJump(lines) elseif key == 101 then lines = -5 LineJumper:LineJump(lines) end end return false end function LineJumper:LineJump(lines) local jump_to_line = editor:LineFromPosition(editor.CurrentPos) + lines if jump_to_line <= 0 then jump_to_line = 0 end editor:GotoLine(jump_to_line) return false end
After you have done that then open SciTE and click 'Options' --> 'Open Lua Startup Script' and paste this line after the other lines (may require administrative rights):
LoadLuaFile("LineJumper.lua")
Not really useful but it is what it is.
Found the scite editor functions here: http://www.autoitscript.com/forum/topic/135686-scite-some-more-lua-functions-for-editing-in-scite/?p=947290
AutoIt v3.3.9.16 Beta
File Name: AutoIt v3.3.9.16 Beta
File Submitter: Jon
File Submitted: 10 Aug 2013
File Category: Beta
3.3.9.16 (10th August, 2013) (Beta)
AutoIt:
- Fixed: DriveGetType() was incorrectly reporting SSD on Windows XP.
- Fixed #1024: GUICtrlSetTip() for tabitems sets incorrectly in certain situations.
UDFs:
- Added: Constants for DriveGetType() and StringSplit(). See related function documentation for more details.
- Added: InetConstants.au3 for use with Inet functions. See related function documentation for more details.
- Changed: _FileListToArrayRec() to use functions in the Array UDF.
- Fixed: _ArrayTranspose() would crash with one dimension and 4096 elements or greater.
- Fixed #2378: BITMAPV4HEADER and BITMAPV5HEADER Structures using incorrect array values.
You think you can write regex?
SQLite.au3 : non-existent functions
SQLite.au3 :
__SQLite_Inline_Version __SQLite_Inline_Modified
it's not like i hate them or anything... but why not clean them up?
SDL 2.0.0 is released
SDL 2.0.0 has finally been released. I know this will make a certain MVP very happy.
After many years in development, SDL 2.0.0 has finally been released!
http://www.libsdl.org/download-2.0.php
http://www.libsdl.org/projects/SDL_image/
http://www.libsdl.org/projects/SDL_mixer/
http://www.libsdl.org/projects/SDL_net/
http://www.libsdl.org/projects/SDL_ttf/
Ryan has put together an introduction to migrating your existing SDL
application to 2.0:
http://wiki.libsdl.org/moin.fcg/MigrationGuide
More extensive documentation can be found on the community supported wiki:
http://wiki.libsdl.org/
Valve uses SDL 2.0 for game controller support and sundry other things in
Steam, and the new release will be going into the Steam Linux Runtime in
the next day or so.
These are the most important new features in SDL 2.0:
- Full 3D hardware acceleration
- Support for OpenGL 3.0+ in various profiles (core, compatibility,
debug, robust, etc)
- Support for OpenGL ES
- Support for multiple windows
- Support for multiple displays
- Support for multiple audio devices
- Android and iOS support
- Simple 2D rendering API that can use Direct3D, OpenGL, OpenGL ES, or
software rendering behind the scenes
- Force Feedback available on Windows, Mac OS X and Linux
- XInput and XAudio2 support for Windows
- Atomic operations
- Power management (exposes battery life remaining, etc)
- Shaped windows
- 32-bit audio (int and float)
- Simplified Game Controller API (the Joystick API is still here, too!)
- Touch support (multitouch, gestures, etc)
- Better fullscreen support
- Better keyboard support (scancodes vs keycodes, etc).
- Message boxes
- Clipboard support
- Basic Drag'n'Drop support
- Proper unicode input and IME support
- A really powerful assert macro
- Lots of old annoyances from 1.2 are gone
- Many other things!
Enjoy!
--Sam Lantinga
Something that I can't figure out ...
Nevermind, I think I've just been up too long.
Hope I'm not overlooking something.
Global Const $line = _ " $this.Model.UpdateUserProperty('style.au3.32', 'back:' & $this.Model.GetEditBackColor() & ',' & _" ; StringLen() = 104 | 123456789|123456789|123456789|123456789|123456789|123456789|123456789|123456789|123456789|123456789|12345|789| ^ Column 106 ConsoleWrite(StringLen($line) & @CRLF)
StringLen says that $line is 104 chars long. Which is true. When I place the caret after the underscore and in front of the closing quotation mark then SciTE reports the column as 106. I thought they should be the same thing?
If remove the Tab that appears between "GetEditBackColor()" and the ampersand and replace them with two spaces (I have tabs set to two in SciTE) then StringLen will return 103 even though the string appears to be the same length. This must have been some typo I made.
Edit: The forum seems to have changed the formatting. Download this if interested:
Test.au3 528bytes
4 downloads
Operator XOR XNOR
XOR and XNOR Image:
XNOR Image:
English:
http://en.wikipedia.org/wiki/Exclusive_or
English:
http://en.wikipedia.org/wiki/Logical_equality
Polish:
http://4programmers.net/Delphi/Xor
AutoIt v3.3.9.17 Beta
File Name: AutoIt v3.3.9.17 Beta
File Submitter: Jon
File Submitted: 15 Aug 2013
File Category: Beta
3.3.9.17 (15th August, 2013) (Beta)
AutoIt:
- Added: StringReverse() - a UTF16 compatible string reversal function.
- Added: FileReadToArray() - native version of _FileReadToArray().
- Changed: Some misc internal rewrites in array assignment mean that some large internal array assignments (StringRegExp() for example) may be slightly quicker. Maybe.
- Fixed #2366: For loop not working as expected.
UDFs:
Others:
- Added: Sublime Text AutoIt.tmLanguage file to the editors folder. This contains a list of up to date functions.
- Fixed: StringRegExpGUI missing from the help file index menu.
Plus, lots of helpfile changes.
Help File _StringBetween() definition to change
Hello Devloper,
Just a small definition to change in the Help file about _StringBetween():
it says:
Returns the string between the start search string and the end search string.
I would replace by:
Returns an array containing the string between the start search string and the end search string.
I just spent 15 min to understand why my script wasn't working !!!!
Thanks
Cram.
Congratulation to guinness to become a Developer
Best regards guinness
Automated Network Folder Auditor
I am trying to write a program that will go through a *.txt file produced by Windows PowerShell using this command 'Get-Acl @:\* | Format-List >dump.txt'. This command produces a list containing the names of all the files in the '@' directory along with their attributes such as: Owner, Access, etc. The issue I am having, is that when I am trying to parse the names of the directories without the '@:\' portion of the path name as well as with it, the program is skipping folders listed in the *.txt file. I apologize for all the 'If' statements in the one function. It has been a while since I had to put some serious thought into my code. I am a little embarassed to admit it but I have been at this for too long now, and I could really use some help. Also please note that, the code that is under the 'M:\' If condition is the most up to date as I have been debugging with files from an external drive I mounted as M:\.
Again Thank You For Any Help!
;Day 1 Date: 8/14/2013 ;Written By: James Anderson ;Purpose: The following program was written as apart of a security audit on all \\ #include <File.au3> MsgBox(64, "Permission Modifier (Requires PowerShell Permission Dump File)", "This program has been designed to read a *.txt file created by checking directory permissions using the command 'Get-Acl @:\* | Format-List >dump.txt'. With this file it will use the dumped directories to edit permissions and set access for only the IRS/Administrator and the IRS/User", 15) Global $dirCount = 1 ;Tracks which occurence of directory/ which user dump we are on in the read/stored dumpFile Dim $fileContents ;Stores what is left after previously used information has been truncated from read/stored dumpFile Dim $fileDump ;This While loop is for receiving a valid dumpFile $found = 0 $find = "PowerShell" ;Searches for keyword:'PowerShell' ;MsgBox(1, "Debug", "Debug: "&$fileContents[$i], 1) $fileContents[$i] = '' $found += 1 Else ;If it is NOT a valid dumpFile ;This For loop will check for the directory for which permissions need to be modified based on dumpFile and modify those permissions FindUserDir($fileDump) ;GetUsersWithAccess() ;This function will compose a list of all IRS domain users with access to the current user directory Dim $users ;$a = StringInStr($fileContents, "Access : ") ;StringTrimLeft($fileContents, $a) ;MsgBox(1,"Debug - 'Access:' Location", $a) ;MsgBox(1,"Debug - 'Access:' Location", $fileContents) ;$users = StringSplit($fileContents, "Access:") ;MsgBox(1,"Debug", $users[1]) ;This function will return the user directory (Ie. M:\janderson), it also defines the global userName variable & the fileContents variable Dim $dir Dim $temp $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] UpdateDumpFile($array) $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1] $dirCount += 1 $userDirectory = $dir[1]
UDPRecv bug?
Hello,
I just want to know if this is a bug?
Global $Info = _GetServerInfo() If @error Then ConsoleWrite("Error " & @error & " getting info" & @CRLF) Else ConsoleWrite($Info & @CRLF) EndIf Func _GetServerInfo() UDPStartup() Local $socket = UDPOpen("192.168.5.5", 20500) If @error <> 0 Then Return SetError(1, 0, "") UDPSend($socket, "GetServerInfo" & Chr(0)) If @error <> 0 Then Return SetError(2, 0, "") Local $data = UDPRecv($socket, 50, 2) ; if UDP-server is not reachable, then no error is set and no array is created If @error <> 0 Then Return SetError(3, 0, "") UDPCloseSocket($socket) UDPShutdown() Return $data[0] EndFunc ;==>_GetServerInfo
If server IP is local IP then an error is thrown as expected.
Logitech G150 backlight color
Does any one know if it's posible to write a script o change my logitech g150 keybord led backlight. n i have found help tith writting scripts for the lcd but nothing on the led backlight. any help would be greatly appreciated
Creating your own file signature
I was thinking of adding file signatures to some of the files I create with some programs I have made. I thought I'd ask if anyone has any advice about this. Clearly it is better to avoid duplicating an existing signature. Are there any online resources or advice anyone can recommend? Thanks.
Help file - Poll
Example: http://www.autoitscript.com/autoit3/mvps/guinness/InetGet.htm
So look at the example above and select a function or macro in the example. Should this be added to the help file?
Offers for the help file compiler
1. Need to do so that the compiler was multilingual. All texts were inserted at the beginning of the script. For translators it simplifies updating of scripts. It isn't required to look for automatic change of texts again.
2. Need to do to be able to change the compilation settings, or in the GUI, or via the com-line
3. Need to make to the color theme can be changed to black. About 20% are using a black theme to eyes do not get tired. Allow the user to provide information in the form in which it wants to see it.
4. Need to do so that the compiler was as the independent program. That any beginner could use. It will give the chance to those who want to translate the help file to start it doing.
Compilation options which can be added in GUI:
1. Color of syntax.
2. Color in the description
3. Links in examples
4. Links in the description
5. Choosing a theme