-
Posts
37 -
Joined
-
Last visited
Content Type
Profiles
Forums
Applications
Posts posted by MAPJe71
-
-
What is exactly the problem? Adding a custom command in Ketarin and/or figuring out the right paramters for 7Zip?
Example for a custom command:
START "" /B /MIN /WAIT "<Your-7Zip-path>\7z.exe" e "{file}" -bd -o"<Your-Output-Path>" -y
-
FYI
I have been able to retrieve a direct-download URL using Ketarin.
It requires two request-verification tokens. The first token can be found in a cookie. You have to retrieve the token from the cookie because it changes regulary and is somehow connected to the second token. Haven't verfied it yet but I guess its value changes daily. The second token can be retrieved from the applications page. This token changes on every get-request of that page.
I was not able to retrieve the first token from the cookie using Ketarin. I used Fiddler to get the token value and added it as a constant (i.e. textual content variable) in Ketarin to retrieve the direct-download URL.
-
Selecting 'C# script' as a command shows the following info ...
/* Enter a custom C# script here. C# is case sensitive. "app" references the current application. Example: MessageBox.Show(app.Name); = Notable methods = app.PreviousLocation Corresponds to the variable {file} app.Variables.ReplaceAllInString("Any {text} with variables.") Replaces all known variables in a given string. Example: string new = app.Variables.ReplaceAllInString("{file}") return; Exits the script. Abort("Error text"); Exits the script with a given error. */
I could not find any additional info here in the forum or on the Wiki.
So I was wondering if anyone knows more about the API in additional to the aforementioned 'notable methods' and
could point me in the right direction.
Thanx, Menno
-
Is it possible (and when yes how) to assign a value to a variable in a C# command script?
Thanx, Menno
-
CodePlex requirs two request-verification-tokens to retrieve the redirect-URL to download the actual file.
One token can be retrieved from the applicable HTML-page. The other token can be retrieved from a cookie.
However, AFAIK Ketarin does not support reading cookies.
In order to be able to use Ketarin to download from CodePlex I hereby request the feature to read cookies.
Preferable in such a way that it is possible to store the data in a variable (e.g. "Content from Cookie").
-
I have used http://fiddler2.com/ to debug/investigate the communication between the CodePlex-site and a browser (FireFox & Chrome).
Tried to have Ketarin exchange the same messages with CodePlex. Failed to do so with resolving the 'variables'.
Will try some C# code/script next.
-
Filetime seems to be 100-nanoseconds since Jan 1 1601 e.g. 130108901247070000 == Friday, April 19, 2013 8:08:45pm.
See also / I used: http://www.silisoftware.com/tools/date.php
-
I'll add this to the next version. If someone gives me a better regex for getting the version number from a site like this
http://filehippo.com...d_firefox/tech/
than this regex <code>((?<=\>Title:\<.*?\s)(?:\(?\d+?\.\d+?.*?)(?=\</td\>)|(?:[a-z]+?\s\d{1,2},\s\d{4}))</code>
I'll also add it to the beta.
Well I guess you have several RegEx options for that particular URL ...
- Parse the title of the window:
(?<=\<title\>Download\D+?)\d{1,5}\.\d{1,5}(?:\.\d{1,5}(?:\.\d{1,5})?(?:\sRC\d)?|\sBeta\s\d{1,2}|b\d{1,2})?(?=\D)
- Parse a meta tag:
(?<=meta itemprop=['"]softwareVersion['"] content=['"]\D*?)\d{1,5}\.\d{1,5}(?:\.\d{1,5}(?:\.\d{1,5})?(?:\sRC\d)?|\sBeta\s\d{1,2}|b\d{1,2})?(?=['"])
- Parse the download table on the far right on the page:
(?<=dlboxinner.+?Version\D*?)\d{1,5}\.\d{1,5}(?:\.\d{1,5}(?:\.\d{1,5})?(?:\sRC\d)?|\sBeta\s\d{1,2}|b\d{1,2})?(?=\D)
Regards,
Menno
-
@shawn
Could you post what you found up till now so someone else can give it a try?
Thnx
-
Yep, escaping the closing curly bracket only works just fine!
Thnx
-
Hi,
I defined a textual variable which uses the regexreplace function to rearrange some values e.g.
{mytemp:regexreplace:(\d{1,2})\s(\d{1,2}),\s(\d{2,4}):$3-$1-$2}It uses the '{...}'-quantifier but this conflicts with the Ketarin-variable-definition.
I re-defined the variable to
{mytemp:regexreplace:(\d+)\s(\d+),\s(\d+):$3-$1-$2}but was wondering if there is another solution e.g. 'escaping' the curly brackets (tried '\', did not work).
Thanks,
Menno
How to export all applications to separate XML per Application
in Tips and Tutorials
Posted
The PowerShell script I use to split an applications-export XML file into individual XML files: