-
Posts
285 -
Joined
-
Last visited
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by EmptySpace
-
There is few buttons and all of them have same value and name. Only differences is action code in html. <form method="post" action="/https/www.autoitscript.com/somestuffblahblahblah"> I didnt used autoit for ages so im lost in these things. So how I could click button only knowing that action code. $oButtons = _IETagNameGetCollection ($oIE, "INPUT") For $oButton In $oButtons If $oButton.action = "/peaceofletters" Then ;if that would work.. : _IEAction ($oButton, "click") ExitLoop EndIf Next Sorry for my bad english.
-
Need help with arrays! (dont add same arrays)
EmptySpace replied to EmptySpace's topic in AutoIt General Help and Support
Thanks for help! -
All the time I find it difficult to use arrays becouse all that redim, ubound stuff.. so I used variables alot! I need func which would allow to add only unique arrays. #include <Array.au3> $ArraySTORAGE=_ArrayCreate("") $ArraySTORAGE[0] = Ubound($ArraySTORAGE) - 1 $whattoadd = 'always other string' For $i = 1 To UBound($ArraySTORAGE) - 1 If |$ArraySTORAGE contains| = $whattoadd Then ;;; Else _ArrayAdd($ArraySTORAGE ,$whattoadd ) Endif Next Should I use _ArraySearch() ? Also I want to know how to clear whole array at once without using loop with _ArrayDelete() + I want to create 2D array but I dont know how to declare it in begining becouse all my elements would be added during the script (imputs/plits and so on..) I hope you guys understand me
-
How to fully change user agent?
EmptySpace replied to EmptySpace's topic in AutoIt General Help and Support
-
How to fully change user agent?
EmptySpace replied to EmptySpace's topic in AutoIt General Help and Support
I need my user agent changed all time. #include <IE.au3> Global Const $sLink = "http://useragentstring.com/" GUICreate("Test User-Agent String", 700, 500) _IEErrorHandlerRegister() $oIE = _IECreateEmbedded() GUICtrlCreateObj($oIE, 10, 10, 680, 480) _IENavigate($oIE,"http://www.useragentstring.com/") sleep(1000) GUISetState() $oIE.Navigate2($sLink,Default, Default, Default, 'User-Agent: My super special user agent string.') While GUIGetMsg() <> -3 WEnd If I refresh page then I see my old ua.. -
How to fully change user agent?
EmptySpace replied to EmptySpace's topic in AutoIt General Help and Support
"Sets the user-agent string sent with InetGet() and InetRead() requests." Can I make it to work with _IECreateEmbedded() in direct browsing? not only for inet funcs? Its empty -
Long ago I tried to make program where I could fastly change user agent for IE embedded object in GUI. Now when I need to change it again I found that my user agent string is full of unneeded strings: Mozilla/4.0 (c; MSIE 7.0; cx; Trident/4.0; BTRS123646; GTB7.4; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SIE-ME75/22 UP.Browser/7.0.2.2.d.7(GUI) MMP/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1) With this method: http://www.door2windows.com/how-to-change-internet-explorer-user-agent-string-in-all-versions-of-internet-explorer-without-any-tool/ I added '; SIE-ME75/22 UP.Browser/7.0.2.2.d.7(GUI) MMP/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1)" but now cant delete leaving blank in custom string imputbox. Also tried: http://www.zytrax.com/tech/web/change-ua.html Both ways wont work. Ie addon http://www.iegallery.com/Addons/Details/2040 works how I want but it wont change UA in embedded object. Any ideas? How I can restore my UA to default if that 2 ways dont work? (Check your UA here http://www.useragentstring.com/)
-
That permission to use Skype wont pop up anymore. Multiaccount would be very usefull! Now I use websites like plus.im to run my skype. I have 3 skype profiles and I need to run them at the same time (one skype for family/friends, other for my work...)
-
Sorry for my bad english. I want to run more than one instance on my computer. I need to run few skype accounts at the same time.
-
Its possible to do this portable? I mean I run real skype on my pc, and I want to run other skype profile with this UDF.
-
My code: (I just pasted code from where I get error. I have GUI and other stuff ofcourse and its +200lines of code..) Func pagr() $i = $i + 1 showchromosom($i) Endfunc Func showchromosom($line) $oForm1 = _IEFormGetCollection($oIE, 0) $x = _IEFormElementGetObjByName($oForm1, "x") $y = _IEFormElementGetObjByName($oForm1, "y") $linne = FileReadLine($chromstxt,$line) $setup = StringSplit($linne, "|") _IEFormElementsetValue($x,$setup[1]) _IEFormElementsetValue($y,$setup[2]) EndFunc In txt file I have 5lines or more. As you see line contains number|number After showing these 5lines it tries to show 6line and error popups Array variable has incorrect number of subscripts or subscript dimension range exceeded.: _IEFormElementsetValue($y,$setup[2]) _IEFormElementsetValue($y,^ ERROR How to make it stop after it reads 5 lines? There is no loop or something I just push the button.
-
Replace empty space with comma in txt file
EmptySpace replied to EmptySpace's topic in AutoIt General Help and Support
Thanks! -
Hey, I need some help from you guys. For example my text text just text wait wut after script work: text,just,text,wait,wut Maybe I need to use StringRegExp()? I never used it before. So ok my code: #include Global $pw = FileOpen("textwithspaces.txt") Global $hOutPutFile = FileOpen("nospaces.txt", $FO_OVERWRITE) $hash = FileRead($pw) ;I need array loop or something? ;I would try to read line by line and use stringinstr or smth but I beleive there is faster way WEnd FileClose($pw) FileClose($hOutPutFile)
-
I use FTP as my file storage in uploading 1-10kb txt files. I use winhttp to do that but you need php code too Autoit code: #include "WinHttp.au3" Global Const $Adres = "website.com" $subdomain = "uploads/index.php" $filetxt= (@scriptdir & "\test.txt") Global $hOpen = _WinHttpOpen() Global $hConnect = _WinHttpConnect($hOpen, $Adres) Global $sHTM = _WinHttpSimpleFormFill($hConnect, $subdomain, Default, "name:ufile", $filetxt) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) php code: <?php if (isset($_POST['submit']) && !empty($_FILES["ufile"]) && move_uploaded_file($_FILES['ufile']['tmp_name'], "uploads/".time(). "_".basename($_FILES['ufile']['name']))) { echo "Done."; } ?> <html> <head> <title>Upload</title> </head> <body> <form action="index.php" method="post" enctype="multipart/form-data"> Select file: <input name="ufile" type="file" /><br /> <input type="submit" name="submit" value="Upload" /> </form> </body> But also there are way uploading it directly to ftp #include <process.au3> #include <FTPEx.au3> Global $host, $user, $pass ; $host = "ftp.hosting.com" ;can be ip $user = "username" ; FTP Username $pass = "password" ; FTP Password ; Global $file = (@ScriptDir&"/test.txt") Global $open = _FTP_Open('MyFTP Control') ConsoleWrite(@error & "-" & @extended & @CRLF) If $open Then $conn = _FTP_Connect($open, $host, $user, $pass, 0, 21) ConsoleWrite(@error & "-" & @extended & @CRLF) If $conn Then $ftpp = _FTP_FilePut($conn, $file, "/htdocs/uploads/test.txt") ConsoleWrite(@error & "-" & @extended & @CRLF) If $ftpp Then _FTP_Close($open) EndIf EndIf EndIf I think these codes are full of errors but you can make something by yourself
-
Run only 1 scipt/program at same time
EmptySpace replied to EmptySpace's topic in AutoIt General Help and Support
It works! Thanks -
I cant find working solution. I tried If UBound(ProcessList(@ScriptName)) > 2 Then Exit It works how I want but if I rename program then I can easly start more programs cos procces changes too. Also tried: If WinActive("[TITLE:my programs title]", "") then exit Programs title wont change so its best to use it but I cant find how.
-
Hello, I didnt used autoit for long time and I need to make script which would click button in frames. It works for one time but I cant use it again cos I know that some kind of loop are running. $oFrame = _IEFrameGetCollection($oIE, 0) $colForms = _IEFormGetCollection($oFrame) $iFormCnt = @extended $iForm = 0 For $oForm In $colForms $colElem = _IEFormElementGetCollection($oForm) $iElemCnt = @extended $iElem = 0 For $oElem In $colElem IF _IEFormElementGetValue($oElem) = "button" Then ConsoleWrite("found") _IEFormSubmit ($oForm) EndIf $iElem += 1 Next $iForm += 1 Next I know that in site is only one frame so I think I dont need one loop. Thanks
-
Check for email dublicates in .txt file
EmptySpace posted a topic in AutoIt General Help and Support
Hello, List looks like: [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] When I run the script I want it to find same emails and delete them. In this case I would need to delete [email protected] I dont know if I should read them into array and do checking line by line. Its still hard for me to work with arrays :| -
Two .txt files: Exmaple of first txt 424242424242:text 3423434322311:text 2133245345344:text 5443322134566:text 65432345322344:text And so on Second txt: user:65432345422344:email:address user:424242424242:emailt:address user:43324567534:email:address And so on So what I want is to find these code dublicates and from 2 lines make only 1 in new txt. For example firstly I check 424242424242:text and compare few hundrets of other file lines till I find 424242424242. When I find output in new txt should be 424242424242:text |empty space or any symbol| user:424242424242:emailt:address. Better would be without that code. And if same code wasnt found then go for 3423434322311:text .... What I already tried. #include <FileConstants.au3> #include <array.au3> Global $hashpw1 = FileOpen("txtfile1.txt", 0) global $hasemail1 = FileOpen("txtfile2.txt", 0) Global $hOutPutFile = FileOpen("output.txt", $FO_OVERWRITE) While 1 $hashpw = FileReadLine($hashpw1) For $i = 1 to 6000 ;Im not sure for this loop. I need to check ALL lines so maybe I should use _FileCountLines() ? $hasemail = FileReadLine($hasemail1) $aSplit1 = StringSplit($hasemail, ":") If StringInStr(StringMid($hashpw,1,32),$aSplit1) Then MsgBox(0,"","found?") FileWriteLine($hOutPutFile,$hashpw&" "&$hasemail) EndIf Next WEnd FileClose($hashpw1) FileClose($hasemail1) FileClose($hOutPutFile) BRAINPAIN!
-
Split text and put every line in array
EmptySpace replied to EmptySpace's topic in AutoIt General Help and Support
Thanks! -
Split text and put every line in array
EmptySpace replied to EmptySpace's topic in AutoIt General Help and Support
Cant understand how it works. FileWriteLine($hOutPutFile, $aSplit[$i]) If I want only write second string? $aSplit[$i][2] or something? -
Split text and put every line in array
EmptySpace replied to EmptySpace's topic in AutoIt General Help and Support
Thanks for help guys. Every code works fine. BrewManNH your script looks best but also I need to put strings in different output txts