27 posts in this topic
Hello AutoIT community.
I am attempting to make a script that will login to my bank account and retrieve one of my account balances and display it in a MsgBox, however it am having some difficulty getting the correct value.... The MsgBox keep displaying a value of "0" instead of the actual string in between the source code I'm looking for.... Any help would be greatly appreciated!
$readtext = InetRead("https://www.xxxbanksitexxx.com/das/cgi-bin/session.cgi?screenid=SIGNON_PORTAL_PAUSE&LOB=CONS",1)
$source = BinaryToString($readtext)
$text = _StringBetween($source,'CHECKING XXXXXXXXXX ', ' "> ')
MsgBox(0,"balance",$text) ;This keeps returning a value of "0"
WARNING: I never tried this on a root directory, I should probably write a fix for that case. EX: There is no C:\..\
I don't know how many of these there are on this forum and I know Tidy is real nice for making backups.
I have a few dislikes relying on the Tidy backup:
1 I'm not crazy about the backup folder it creates in project folder.
2. If no Tidy edits are performed script is not backed up on Tidy. I can't rely on that when I request a backup.
3. If I want to backup a select group of files without backing up the entire project folder, it is somewhat tedious to select each file and Tidy.
Now this is just a very simple script that I felt I could use to simplify backing up my project.
I'm not asking you to code it for me, but I welcome feedback. If you think you can make it better or know of something better please share.
I know of Github it's overkill for me, I'm not comfortable, and I won't use it as much as I need to.
So here it is:
You place it in the source folder, open it in Scite.
Change: Global $gBackup_dir_path = "..\Backup\" to wherever you want you backup folder Path to be.
in the main() add some backup("file_name") calls remember to remove file extension.
and it should make a new backup file for each backup("file_name") every time you run the script.
Test it out make sure it's working and you're good to go.
#cs ---------------------------------------------------------------------------- AutoIt Version: 188.8.131.52 Author: myName Script Function: To copy files to a backup folder. #ce ---------------------------------------------------------------------------- #include <File.au3> Global $gBackup_dir_path = "..\Backup\" ; Todo ; Add notes, options notes in file name main() func main() ; File list remember to remove extentions from file_name ; or add file extention as second parameter backup("Map_Editor") backup("DW_Server") EndFunc Func backup($spFile_name, $spFile_ext = ".au3") Local $error = 0 Local $iFile_num = 0 ; Make source file path Local $sFile_path_source = $spFile_name & $spFile_ext Local $sFile_path_dest = "" ; Sample the contents of the backup directory before creating a file there Local $aFile = _FileListToArray($gBackup_dir_path, $spFile_name&"*"&$spFile_ext, $FLTA_FILES) $error = @error If $error = 0 Then $iFile_num = $aFile EndIf out("Found: " & $iFile_num & " files named: " & $spFile_name) Do ; Incroment file_num to find available file_name $iFile_num += 1 ; Path to Write File Copy $sFile_path_dest = $gBackup_dir_path & $spFile_name & "_" & $iFile_num & $spFile_ext ; Refuse to Overwrite File If FileExists($sFile_path_dest) = 0 Then ExitLoop EndIf ; Am I right? Sleep(30) Until 0 ; Create the file FileCopy($sFile_path_source, $sFile_path_dest, $FC_CREATEPATH) $error = @error If $error Then out("FileCopy() error: " & $error) out("sFile_path_source: " & $sFile_path_source & " sFile_path_dest: " & $sFile_path_dest) EndFunc ;==>backup Func out($output = "", $user = 0);debug tool ConsoleWrite(@CRLF & $output);to console new line, value of $output EndFunc ;==>out Backup_Script.au3
The script isn't authorized to overwrite files, and tries to create the next number of file_name available.
The 'p' in my variable names stands for parameter.
After i use that, all of thing is good and perfect,
Local $dData = InetRead("http://example.com/my.html",1) $my = BinaryToString(StringReplace($dData, "0A", "0D0A"), 4) but now how can i reload that after x time ?!
by this ( top script ) , i need to relunch the script to see modified,
now! how can i update data after X time !?
for example :
in "my.html" we have number "3" , i try to change it to "5", now we need to relunch script to see "3" => "5",
how we can use that without relunch script.
thanks alot and sorry for my bad english & too long question.
Inetget and InetRead don't recognize IE cookies on Windows 10 and so can't be used on password-protected sitesBy morganlove
Ever since I upgraded to Windows 10, scripts using Inetget and InetRead no longer seem to recognize Internet Explorer cookies. This makes them useless for websites that require you to be logged in to. Has there been some sort of change to IE cookies because of the upgrade and new Edge browser? Is there a way around this?
i have one question ! ,
how we can use a "inetread" without any changes in doc,
it's meant :
for example in this address we have this source : (Address : http://example.com)
<!doctype html> <!-- i have <br/> ( Enter ) --> <html> <!-- i have enter too --> <head> <!-- i have too --> <title>i am in autoit :) </title> <meta charset="utf-8"> </head> <body> <p> i want to go in autoit :( </p> <a href="http://autoitscript.com">autoit</a> </body> </html> in this source you see many "Enter", now how we can have this (source) by "inetread" or "inetget" or something like that,
i try to use that with "inetread" but it have not any "enter"!
*sorry for my many questions,