Jump to content

brutal

Members
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

brutal's Achievements

Seeker

Seeker (1/7)

2

Reputation

  1. Just a guess on part of the issue you are running into... You said:: FileMove and Delete don't seem to execute. If the file is 'in use' then neither of those would work, both would fail... So, use a kill task to make that file accessible to the commands you are trying to run.
  2. Hello, I have a small software development company that specializes mainly in increasing internet presence for small businesses. This means we do a lot of IE automation interacting with other sites based upon the needs of the current project. We currently have 2 extremely talented AutoIt programmers on staff and have room for one more person. This is basically a full time position that pays a set amount weekly. We use both skype and discord extensively in our daily communications. If you have any interest at all in a reliable/steady guaranteed income, please connect with me via PM and provide the following information... 1- How do you rate yourself in AutoIt programming experience [expert/extensive] - [moderate/comfortable] - [novice/still learning] 2- How many hours are you available to work each week. 3- What country do you currently live in. (we use this only to determine your daylight hours compared to ours) 4- What is your weekly pay requirement? (How much do you expect to get paid) *Note* I didn't see anywhere that it was against the rules to make this sort of request, so I posted it. However, I enjoy being a part of this community and do not want to harm that in any way, so if this post is against any rules, please delete it or let me know and I will delete it. All communications should come via PM here on the forum so that none of us have personal contact information flying around out in the open. Thanks for reading.
  3. Update: I figured out the issue I was facing... Self-inflicted wound! I had my signature being created using the wrong time. Now, once I figured that out, the response text still shows a 401permission denied error message BUT I believe that is simply because IE cannot read the .json file that is returned and instead simply pops open the browsers save dialog. Using the same url in chrome or firefox works perfectly, but since I really do not want to leave IE, I'm now at a point where I need to figure out how to either get IE to read that file, or make it so that it saves the file for me without the save prompt ever displaying. Final Update: A simple inetgetsource took care of it! - I truly love autoit! (no matter how much frustration it provides :-)
  4. I am afraid I am not using the right method of passing my moz url string and hoping someone with experience working with the moz api can point me in the right direction. Using winhttp to post the data is returning a 401 error (permission denied), yet I am certain that the data I am passing is correct, and the format is correct. So my best guess at this point is that I should be using something other than winhttp to post the data. For clarity: [1] The exact same credentials work on my php script, so I know they are good. [2] The string format I am sending via winhttp is good (I use this particular method extremely frequently in other projects, just not with this particular api) [3] The only potential sticking point is the encoded signature, but since my php creates that for me, I feel certain it too is correct. So, if you happen to have moz api experience, a nudge in the right direction would be greatly appreciated.
  5. *Note: I am putting this here because I couldn't find any recent walk-through posts on the topic and didn't want to revive an old thread. #cs Notice: This script is coded in a way that most enperienced coders will scoff at... But it is a valid starting point for anyone to get an idea of how to achieve the end result. This is a walk-though on creating a simple and effective invisible update process for your software. There are many ways to do this. This is as simplified as it comes to achieve the desired end result. ---- Your srcipt will check the version number of your local target exe file and it will check version.txt on your server. [if] version.txt is higher than your local exe version [then] the update file is downloaded, the original file is deleted, and the update file is renamed to the original exe file name. ---- *Note- In my own software builds I tend to run 2 exe's... One is my gui (that contains my update script) and the other is the actual exe that does the real work. This allows me to update my underlying program code without the user needing to do anything on his side. *You can run 2 copies of this script (names/vars changed) so that you can also version check/update your main gui exe as well. (This will require a little different approach and will not be covered here.) I included message boxes along the way to help you visualize the process - You will want to remove those for a production environment. #ce #include <MsgBoxConstants.au3> #include <IE.au3> #include <INet.au3> #include <WinAPIFiles.au3> ;global vars have to be above all code - Global vars are frowned upon in general, but for this example they do what is needed Global $serverVersionFile = "https://yourdomain.com/version.txt";create a txt file in your webhosting account and only include your software version in it, for example: 2.0.0.0 Global $UpdatePathIs = @ScriptDir & "\update.exe"; This is the local path where you want your update to be downloaded into. Global $serverUpdateExe = "http://yourdomain.com/update.exe"; This is the path to the update.exe file on your server. Global $ToBeReplacedPathIs = @ScriptDir & "\original.exe"; This is the path to your original program that you want to update. Global $doDownload Global $updateFailed Global $retryornot ; ---- These are the two main functions to run GetCurrentSoftwareVersion() doVersionCheck() ;---- Func GetCurrentSoftwareVersion() ; Retrieve the file version of the target/original executable. | Retrieve the version number contained in your version.txt file. Global $localEXEversion = FileGetVersion($ToBeReplacedPathIs) Global $remoteEXEversion = _INetGetSource($serverVersionFile) EndFunc ;==>GetCurrentSoftwareVersion Func doVersionCheck() ;check if local version is lower than server version - if server version higher than local version then push update If $localEXEversion < $remoteEXEversion Then MsgBox(0,"","server version higher - lets update it") Global $doDownload = InetGet($serverUpdateExe, $UpdatePathIs, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND); This goes and downloads our update.exe file (forces a fresh download) ;The 'do' statment below forces the script to wait until the download has completed to continue. Do Sleep(250) Until InetGetInfo($doDownload, $INET_DOWNLOADCOMPLETE) MsgBox(0,"","download completed") DownloadDeleteRename() Else MsgBox(0,"","server version lower than current local verison - no action needed"); we do "lower" so that when you are working on updates locally and testing, your script doesn't force you to update. EndIf EndFunc;doVersionCheck Func DownloadDeleteRename() FileDelete($ToBeReplacedPathIs); this will delete the original exe file FileMove($UpdatePathIs,$ToBeReplacedPathIs,1); this will rename your update.exe to whatver your original exe file name was so that you have replaced the original exe with the updated exe ; lets check to make sure our update was successful - We do this by checking the local and remote file versions again... If the update was successful, then the local exe file and the remote version.txt file will be the same number. GetCurrentSoftwareVersion() MsgBox(0,"",$localEXEversion & $remoteEXEversion) If $localEXEversion = $remoteEXEversion Then ;all is good - the update was successful Global $updateFailed = false; this means the update did not fail ConsoleWrite($updateFailed) Else $retryornot = MsgBox(16 + 5,"Update error detected","Likely cause: Firewall/Antivirus prevented the download. ") ;this tells us what button the user clicked on msgbox... cancel = 2, and retry = 4 Global $updateFailed = true; this means the update failed ConsoleWrite($updateFailed) EndIf ; with the if statement below we are telling the software to simply close if the user rejected our update instead of retrying. If $retryornot = 4 Then GetCurrentSoftwareVersion() doVersionCheck() Else ;close application ;Exit (remove this text and uncomment 'exit' to make the program actually close) EndIf EndFunc;DownloadDeleteRename
  6. Nine - You are a Rock Star! Thank you.
  7. Thanks RTFC - Very appreciated!
  8. Update: Found the answer...As far as running a single little line of code such as: MsgBox(0, "remotely read!", "hello world!") Yet still haven't figured out how to run something like: Func test() MsgBox(0, "remotely read!", "hello world!") EndFunc From a remote file #include <MsgBoxConstants.au3> #include <INet.au3> $HTMLSource = _INetGetSource('http://example.com/test.txt') Execute($HTMLSource) ---
×
×
  • Create New...