Quantcast
Channel: AutoIt v3 - Developer Chat
Viewing all 750 articles
Browse latest View live

Strange behaviour


AutoIT scripting resource needed

$
0
0

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

$
0
0

Hi,

I'll post here because this script involved many language...but not Autoit :D

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:

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

$
0
0

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.

AutoIt         
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

$
0
0

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.


Click here to download this file

You think you can write regex?

SQLite.au3 : non-existent functions

$
0
0

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

$
0
0

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

 

Source.


Something that I can't figure out ...

$
0
0

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: Attached File  Test.au3   528bytes   4 downloads

Operator XOR XNOR

$
0
0
I looked through the documentation section "Language Reference / Operators"
There are operators described OR NOT AND.
 
So I remembered that there are also other type of XOR and XNOR
And here I have a question whether they were taken into account when it comes to adding them to the AutoIT?
 
The following examples.

 

XOR and XNOR Image:

https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcTq8IO8Ygk-IJ_LHDqmGmW3hFLeImrRVAPPl2SYJ2pktfyf7Sar

 

XNOR Image:

http://upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Logical_connectives_Hasse_diagram.svg/424px-Logical_connectives_Hasse_diagram.svg.png

 

 

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

$
0
0

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.


Click here to download this file

Help File _StringBetween() definition to change

$
0
0

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 !!!!  :mad2:   :wacko:

 

Thanks

 

Cram.

Congratulation to guinness to become a Developer

Automated Network Folder Auditor

$
0
0

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!

AutoIt         
  1. ;Day 1 Date: 8/14/2013
  2. ;Written By: James Anderson
  3. ;Purpose: The following program was written as apart of a security audit on all \\
  4. #include <File.au3>
  5.  
  6.  
  7. 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)
  8.  
  9. sleep(750)
  10.  
  11. Global $dirCount = 1  ;Tracks which occurence of directory/ which user dump we are on in the read/stored dumpFile
  12.  
  13. Dim $fileContents  ;Stores what is left after previously used information has been truncated from read/stored dumpFile
  14. Dim $fileDump
  15.  
  16. Global $dumpFileLoc = "C:\Users\janderson\Desktop\ModifyPermissions\dumpFile.txt"
  17.  
  18. Global $userName  ;Stores username with out directory NAME ONLY
  19.  
  20. Local $contFlag = False  ;Used for checking dumpFile validity
  21. Local $buttonClick = 0  ;Used to check whether user would like to continue with the operation
  22.  
  23. Dim $userDirectory  ;Stores user directory (Ie. M:\janderson)
  24. Dim $usersWithAccess  ;Stores list of users with access to current user directory
  25.  
  26. ;This While loop is for receiving a valid dumpFile
  27. While $contFlag = False
  28.    Local $fileName = FileOpenDialog("Select PowerShell Dump File", "c:" & "\", "Text (*.txt)", 1 + 2)
  29.  
  30.    $buttonClick = MsgBox(1, "Would you like to continue?", "You have selected:"&$fileName)
  31.    
  32.    If $buttonClick = 1 Then ;Check to see if it is valid dumpFile
  33.       $found = 0
  34.       $find = "PowerShell"
  35.  
  36.       ;Searches for keyword:'PowerShell'
  37.       _FileReadToArray($fileName, $fileContents)
  38.       For $i = 1 To UBound($fileContents) - 1
  39.          If StringInStr($fileContents[$i], $find) Then
  40.             ;MsgBox(1, "Debug", "Debug: "&$fileContents[$i], 1)
  41.             $fileContents[$i] = ''         
  42.             $found += 1
  43.             MsgBox(1, "Debug", "Found: "&$found)
  44.          EndIf
  45.       Next
  46.       If $found > 0 Then ;If it is a valid dumpFile
  47.          $contFlag = True
  48.       Else              ;If it is NOT a valid dumpFile
  49.          MsgBox(1, "Error", "You have selected an Invalid Dump File!", 10)
  50.       EndIf
  51.    EndIf
  52.  
  53. ;This For loop will check for the directory for which permissions need to be modified based on dumpFile and modify those permissions
  54. $fileDump = FileRead($fileName)
  55.  
  56. For $i = 0 To $found
  57.    
  58.    If $i = 0 Then
  59.       $fileDump = FileRead($fileName)
  60.    Else
  61.       $fileDump = FileRead($dumpFileLoc)
  62.    EndIf
  63.    
  64.    FindUserDir($fileDump)
  65.    ;GetUsersWithAccess()
  66.  
  67.    MsgBox(1,"Debug - userDirectory", $userDirectory)
  68.    MsgBox(1,"Debug - userName", $userName)
  69. Exit  
  70.  
  71. Func UpdateDumpFile($array)
  72.    $dumpFile = FileOpen($dumpFileLoc, 2)
  73.    FileWrite($dumpFile, $array)
  74.    FileClose($dumpFile)
  75.    Return
  76.  
  77. ;This function will compose a list of all IRS domain users with access to the current user directory
  78. Func GetUsersWithAccess ()
  79.    Dim $users
  80.    
  81.    ;$a = StringInStr($fileContents, "Access : ")
  82.    ;StringTrimLeft($fileContents, $a)
  83.    
  84.    ;MsgBox(1,"Debug - 'Access:' Location", $a)
  85.    ;MsgBox(1,"Debug - 'Access:' Location", $fileContents)
  86.    ;$users = StringSplit($fileContents, "Access:")
  87.    
  88.    ;MsgBox(1,"Debug", $users[1])
  89.    
  90.  
  91. ;This function will return the user directory (Ie. M:\janderson), it also defines the global userName variable & the fileContents variable
  92. Func FindUserDir ($array)
  93.    Dim $dir
  94.    Dim $temp
  95.       MsgBox(1,"Debug - FindUserDir(Begin)", $array)
  96.    
  97.    If StringInStr($array, "A:\") Then
  98.       $dirPos = StringInStr($array, "A:\",0,$dirCount)
  99.       $fileContents = StringMid($array, $dirPos)
  100.       $dirCount += 1
  101.       $dir = StringSplit($fileContents, @CRLF)
  102.       $userName = StringTrimLeft($dir[1], 3)
  103.       $userDirectory = $dir[1]
  104.       Return
  105.    ElseIf StringInStr($array, "B:\")Then
  106.       $dirPos = StringInStr($array, "B:\",0,$dirCount)
  107.       $fileContents = StringMid($array, $dirPos)
  108.       $dirCount += 1
  109.       $dir = StringSplit($fileContents, @CRLF)
  110.       $userName = StringTrimLeft($dir[1], 3)
  111.       $userDirectory = $dir[1]
  112.       Return
  113.    ElseIf StringInStr($array, "C:\")Then
  114.       $dirPos = StringInStr($array, "C:\",0,$dirCount)
  115.       $fileContents = StringMid($array, $dirPos)
  116.       $dirCount += 1
  117.       $dir = StringSplit($fileContents, @CRLF)
  118.       $userName = StringTrimLeft($dir[1], 3)
  119.       $userDirectory = $dir[1]
  120.       Return
  121.    ElseIf StringInStr($array, "D:\")Then
  122.       $dirPos = StringInStr($array, "D:\",0,$dirCount)
  123.       $fileContents = StringMid($array, $dirPos)
  124.       $dirCount += 1
  125.       $dir = StringSplit($fileContents, @CRLF)
  126.       $userName = StringTrimLeft($dir[1], 3)
  127.       $userDirectory = $dir[1]
  128.       Return
  129.    ElseIf StringInStr($array, "E:\")Then
  130.       $dirPos = StringInStr($array, "E:\",0,$dirCount)
  131.       $fileContents = StringMid($array, $dirPos)
  132.       $dirCount += 1
  133.       $dir = StringSplit($fileContents, @CRLF)
  134.       $userName = StringTrimLeft($dir[1], 3)
  135.       $userDirectory = $dir[1]
  136.       Return
  137.    ElseIf StringInStr($array, "F:\")Then
  138.       $dirPos = StringInStr($array, "F:\",0,$dirCount)
  139.       $fileContents = StringMid($array, $dirPos)
  140.       $dirCount += 1
  141.       $dir = StringSplit($fileContents, @CRLF)
  142.       $userName = StringTrimLeft($dir[1], 3)
  143.       $userDirectory = $dir[1]
  144.       Return
  145.    ElseIf StringInStr($array, "G:\")Then
  146.       $dirPos = StringInStr($array, "G:\",0,$dirCount)
  147.       $fileContents = StringMid($array, $dirPos)
  148.       $dirCount += 1
  149.       $dir = StringSplit($fileContents, @CRLF)
  150.       $userName = StringTrimLeft($dir[1], 3)
  151.       $userDirectory = $dir[1]
  152.       Return
  153.    ElseIf StringInStr($array, "H:\")Then
  154.       $dirPos = StringInStr($array, "H:\",0,$dirCount)
  155.       $fileContents = StringMid($array, $dirPos)
  156.       $dirCount += 1
  157.       $dir = StringSplit($fileContents, @CRLF)
  158.       $userName = StringTrimLeft($dir[1], 3)
  159.       $userDirectory = $dir[1]
  160.       Return
  161.    ElseIf StringInStr($array, "I:\")Then
  162.       $dirPos = StringInStr($array, "I:\",0,$dirCount)
  163.       $fileContents = StringMid($array, $dirPos)
  164.       $dirCount += 1
  165.       $dir = StringSplit($fileContents, @CRLF)
  166.       $userName = StringTrimLeft($dir[1], 3)
  167.       $userDirectory = $dir[1]
  168.       Return
  169.    ElseIf StringInStr($array, "J:\")Then
  170.       $dirPos = StringInStr($array, "J:\",0,$dirCount)
  171.       $fileContents = StringMid($array, $dirPos)
  172.       $dirCount += 1
  173.       $dir = StringSplit($fileContents, @CRLF)
  174.       $userName = StringTrimLeft($dir[1], 3)
  175.       $userDirectory = $dir[1]
  176.       Return
  177.    ElseIf StringInStr($array, "K:\")Then
  178.       $dirPos = StringInStr($array, "K:\",0,$dirCount)
  179.       $fileContents = StringMid($array, $dirPos)
  180.       $dirCount += 1
  181.       $dir = StringSplit($fileContents, @CRLF)
  182.       $userName = StringTrimLeft($dir[1], 3)
  183.       $userDirectory = $dir[1]
  184.       Return
  185.    ElseIf StringInStr($array, "L:\")Then
  186.       $dirPos = StringInStr($array, "L:\",0,$dirCount)
  187.       $fileContents = StringMid($array, $dirPos)
  188.       $dirCount += 1
  189.       $dir = StringSplit($fileContents, @CRLF)
  190.       $userName = StringTrimLeft($dir[1], 3)
  191.       $userDirectory = $dir[1]
  192.       MsgBox(1, "Debug - kkkkkkk", "kkkkk")
  193.       Return
  194.    ElseIf StringInStr($array, "M:\")Then
  195.       $dirPos = StringInStr($array, "M:\",0,$dirCount)
  196.       MsgBox(1,"Debug - FindUserDir(1)", $array)
  197.       $array = StringMid($array, $dirPos)
  198.       MsgBox(1,"Debug - FindUserDir(2)", $array)
  199.       $dirCount += 1
  200.       $dir = StringSplit($array, @CRLF)
  201.       $userName = StringTrimLeft($dir[1], 3)
  202.       $userDirectory = $dir[1]
  203.       UpdateDumpFile($array)
  204.       Return
  205.    ElseIf StringInStr($array, "N:\")Then
  206.       $dirPos = StringInStr($array, "N:\",0,$dirCount)
  207.       $fileContents = StringMid($array, $dirPos)
  208.       $dirCount += 1
  209.       $dir = StringSplit($fileContents, @CRLF)
  210.       $userName = StringTrimLeft($dir[1], 3)
  211.       $userDirectory = $dir[1]
  212.       Return  
  213.    ElseIf StringInStr($array, "O:\")Then
  214.       $dirPos = StringInStr($array, "O:\",0,$dirCount)
  215.       $fileContents = StringMid($array, $dirPos)
  216.       $dirCount += 1
  217.       $dir = StringSplit($fileContents, @CRLF)
  218.       $userName = StringTrimLeft($dir[1], 3)
  219.       $userDirectory = $dir[1]
  220.       Return  
  221.    ElseIf StringInStr($array, "P:\")Then
  222.       $dirPos = StringInStr($array, "P:\",0,$dirCount)
  223.       $fileContents = StringMid($array, $dirPos)
  224.       $dirCount += 1
  225.       $dir = StringSplit($fileContents, @CRLF)
  226.       $userName = StringTrimLeft($dir[1], 3)
  227.       $userDirectory = $dir[1]
  228.       Return  
  229.    ElseIf StringInStr($array, "Q:\")Then
  230.       $dirPos = StringInStr($array, "Q:\",0,$dirCount)
  231.       $fileContents = StringMid($array, $dirPos)
  232.       $dirCount += 1
  233.       $dir = StringSplit($fileContents, @CRLF)
  234.       $userName = StringTrimLeft($dir[1], 3)
  235.       $userDirectory = $dir[1]
  236.       Return
  237.    ElseIf StringInStr($array, "R:\")Then
  238.       $dirPos = StringInStr($array, "R:\",0,$dirCount)
  239.       $fileContents = StringMid($array, $dirPos)
  240.       $dirCount += 1
  241.       $dir = StringSplit($fileContents, @CRLF)
  242.       $userName = StringTrimLeft($dir[1], 3)
  243.       $userDirectory = $dir[1]
  244.       Return
  245.    ElseIf StringInStr($array, "S:\")Then
  246.       $dirPos = StringInStr($array, "S:\",0,$dirCount)
  247.       $fileContents = StringMid($array, $dirPos)
  248.       $dirCount += 1
  249.       $dir = StringSplit($fileContents, @CRLF)
  250.       $userName = StringTrimLeft($dir[1], 3)
  251.       $userDirectory = $dir[1]
  252.       Return
  253.    ElseIf StringInStr($array, "T:\")Then
  254.       $dirPos = StringInStr($array, "T:\",0,$dirCount)
  255.       $fileContents = StringMid($array, $dirPos)
  256.       $dirCount += 1
  257.       $dir = StringSplit($fileContents, @CRLF)
  258.       $userName = StringTrimLeft($dir[1], 3)
  259.       $userDirectory = $dir[1]
  260.       Return
  261.    ElseIf StringInStr($array, "U:\")Then
  262.       $dirPos = StringInStr($array, "U:\",0,$dirCount)
  263.       $fileContents = StringMid($array, $dirPos)
  264.       $dirCount += 1
  265.       $dir = StringSplit($fileContents, @CRLF)
  266.       $userName = StringTrimLeft($dir[1], 3)
  267.       $userDirectory = $dir[1]
  268.       Return
  269.    ElseIf StringInStr($array, "V:\")Then
  270.       $dirPos = StringInStr($array, "V:\",0,$dirCount)
  271.       $fileContents = StringMid($array, $dirPos)
  272.       $dirCount += 1
  273.       $dir = StringSplit($fileContents, @CRLF)
  274.       $userName = StringTrimLeft($dir[1], 3)
  275.       $userDirectory = $dir[1]
  276.       Return
  277.    ElseIf StringInStr($array, "W:\")Then
  278.       $dirPos = StringInStr($array, "W:\",0,$dirCount)
  279.       $fileContents = StringMid($array, $dirPos)
  280.       $dirCount += 1
  281.       $dir = StringSplit($fileContents, @CRLF)
  282.       $userName = StringTrimLeft($dir[1], 3)
  283.       $userDirectory = $dir[1]
  284.       Return
  285.    ElseIf StringInStr($array, "X:\")Then
  286.       $dirPos = StringInStr($array, "X:\",0,$dirCount)
  287.       $fileContents = StringMid($array, $dirPos)
  288.       $dirCount += 1
  289.       $dir = StringSplit($fileContents, @CRLF)
  290.       $userName = StringTrimLeft($dir[1], 3)
  291.       $userDirectory = $dir[1]
  292.       Return
  293.    ElseIf StringInStr($array, "Y:\")Then
  294.       $dirPos = StringInStr($array, "Y:\",0,$dirCount)
  295.       $fileContents = StringMid($array, $dirPos)
  296.       $dirCount += 1
  297.       $dir = StringSplit($fileContents, @CRLF)
  298.       $userName = StringTrimLeft($dir[1], 3)
  299.       $userDirectory = $dir[1]
  300.       Return
  301.    ElseIf StringInStr($array, "Z:\")Then
  302.     $dirPos = StringInStr($array, "Z:\",0,$dirCount)
  303.       $fileContents = StringMid($array, $dirPos)
  304.       $dirCount += 1
  305.       $dir = StringSplit($fileContents, @CRLF)
  306.       $userName = StringTrimLeft($dir[1], 3)
  307.       $userDirectory = $dir[1]
  308.       Return
  309.    Else
  310.       Exit
  311.    EndIf

UDPRecv bug?

$
0
0

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

$
0
0

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

$
0
0

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

Offers for the help file compiler

$
0
0

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

SciTe + TIDY - #region #endregion - issue ?

Viewing all 750 articles
Browse latest View live