personoid Posted July 7, 2009 Share Posted July 7, 2009 First: I have the 64 bit version of windows vista, and i want to press F5 in SciTe and have it run in x86 mode. How can i do this? Second: I have a text file with a list of names and passwords. This is the format. Username : Password He is the code i'm using to make this work the way i want. For $i = 1 To $sList $sLineRead = FileReadLine($sList, $i) $oArrayInfo = StringSplit($sLineRead, ":") $sUser = $oArrayInfo[0] $sPass = $oArrayInfo[1] I know this is wrong, but i need to know why it's wrong and how to fix it. Thanks, Personoid Link to comment Share on other sites More sharing options...
Inverted Posted July 7, 2009 Share Posted July 7, 2009 (edited) How does this do on your password file ? I'm using 3 arraydisplays for easier understanding, the first shows all the lines of the file, second shows the usernames and the third the passwords. #Include <Array.au3> #Include <File.au3> Dim $accounts[1] Dim $usernames[1] Dim $passwords[1] _FileReadToArray("accounts.txt",$accounts) _ArrayDisplay($accounts,"") For $i = 1 To $accounts[0] $pos = StringInStr($accounts[$i],":") If $pos = 0 Then ContinueLoop ;disregard lines that don't contain the character ":" _ArrayAdd($usernames, StringLeft($accounts[$i], $pos-1)) _ArrayAdd($passwords, StringTrimLeft($accounts[$i], $pos)) Next _ArrayDisplay($usernames,"") _ArrayDisplay($passwords,"") If there are spaces before and after the ":", then change it to " : " in the StringInStr function I tested it on this example by the way : user1:pass1 user2:pass2 user3:pass3 comments nothing before user4:pass4 gggrggr user5:pass5 Edited July 7, 2009 by Inverted Link to comment Share on other sites More sharing options...
personoid Posted July 7, 2009 Author Share Posted July 7, 2009 (edited) Thanks for your help. This is nice. However, it appears my coding was fine other than a slight "!D!0T" Error. It should have been the following: For $i = 1 To $sList ; $sList is the equivalent of _FileCountLines(@ScriptDir & "\Info List.txt") $sLineRead = FileReadLine($oList, $i); It should have been $oList not $sList. $oList is FileOpen(@ScriptDir & "\Info.txt") $oArrayInfo = StringSplit($sLineRead, " : ", 1); Needed the 1 flag so that usenames/passwords have no extra spaces. $sUser = $oArrayInfo[1] ;0 would have returned the string count $sPass = $oArrayInfo[2] ;1 would have returned the username string. I still need help on always running in x86 mode, though... Edit: Ah, That came in handy. I used the following: $pos = StringInStr($accounts[$i],":") If $pos = 0 Then ContinueLoop ;disregard lines that don't contain the character ":" Though, I did edit the variables a bit.. Thanks again! Edited July 7, 2009 by PersonoidxX Link to comment Share on other sites More sharing options...
KaFu Posted July 7, 2009 Share Posted July 7, 2009 I never laid my hands on a 64bit install (yet , Win7 will be 64bit)... but in the help-file there is a topic "Running the 32-bit version of AutoIt on a x64 System"... and also as far as I know there is a 32bit program files dir on 64bit machines, maybe you just have to install autoit to that dir? OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
personoid Posted July 7, 2009 Author Share Posted July 7, 2009 (edited) I never laid my hands on a 64bit install (yet , Win7 will be 64bit)... but in the help-file there is a topic "Running the 32-bit version of AutoIt on a x64 System"... and also as far as I know there is a 32bit program files dir on 64bit machines, maybe you just have to install autoit to that dir?On Install it checks to see if the user is running a 64 bit OS and prompts to install some extra features.The helpfile says this: "You can run the x86 version of AutoIt by right-clicking a script and selecting "Run Script (x86)".But i want to be able to run the script just by pressing F5 in SciTe, since it's a lot of trouble to hunt down a file i'm working on like this. D:I think maybe installing without the 64 bit stuff should solve the problem... I'll try it and report back..Edit: Yes. Installing without 64 bit components did the trick... Edited July 7, 2009 by PersonoidxX Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now