Jump to content
Ketarin forum

necrox

Moderators
  • Posts

    265
  • Joined

  • Last visited

Posts posted by necrox

  1. Thanks for the hint, Tomorrow. I've never used the slim installer before. I prefer portable/standalone versions. :)

     

    @iliaszou: You can try saving the last version into a txt file and read the last line (last version) and set it as a variable before writing the next version into it. There are a lot of batch and vbscript examples out there to read the last line of a text file. But I'll first of all have to familiarize myself with that. And I also have to find out if it is possible to create "external" variables (read a part of a txt file and use it as a (global) variable)...

  2. Hello iliaszou, it works fine for me. Do you have any blank lines in you command fields? And do not use copy/paste out of the forum for your commands and variables...

    Oh and they removed the slim installer. You have to change your url variable to:

     

    urls8urw.png

  3. If you want to keep the version within your folder name that's what I would use (hope it works):

     

     

    The app:

    appixy8w.png

     

    To use the version number as part of the folder name, use CCleaner {version}.

    If you don't want to use categories or global variables for your download path, simple use D:\{appname}\{url:basefile}.{url:ext} for example.

     

     

    The version:

    versiondxzdw.png

     

    Contents from URL:

    http://www.piriform.com/ccleaner/download/

    Use regular expression:

    (?<=versionHistory.*?v)[0-9.]{2,} 

    The download:

    urlvre19.png

     

    Textual content:

    https://www.piriform.com/ccleaner/download/slim/downloadfile

    The commands:

    commandsf2d7n.png

     

    Execute the following command before downloading:

    MOVE /Y "{file:directory}\License.zip" "%TEMP%"
    RMDIR /S /Q "{file:directory}"

    Execute the following command after downloading:

    MOVE /Y "%TEMP%\License.zip" "{file:directory}\"
  4. I forgot the Foxit problem. Instead of using the link above (http://www.foxitsoftware.com/Secure_PDF_Reader/) use the official download page as found in menu on top of the web page.

    http://www.foxitsoftware.com/downloads/
    

    In case you are using Firefox, analyze the web code with Firefox's Web Developer Tools (especially the Debugger). There you will see a lot of files  e.g. downloads.js, downloads/ and so on and some redirect to pages like getPackage.php and getForm.php and a lot of variable if you follow all the linked pages, js files and asp files. What you need is the page getPackage.php and the variables.

     

    Use the link below to determine your version...

    http://www.foxitsoftware.com/downloads/require/getPackage.php?&product=Foxit-Reader&platform=Windows&language=English

    ...with the regex below to get the version number for the english download or change platform= and language= to whatever you wish for the other versions.

    (?<="version":\[")[0-9.]{2,}(?=\",)

    version06c77.png

     

     

    Your download link is an easy thing. Chose your download from the form on the website and redirect to the next page via download button. The redirection page is:

    http://www.foxitsoftware.com/downloads/latest.php?product=Foxit-Reader&platform=Windows&package_type=exe&language=English

    and this is what we need. If you download a file it will redirect you to another page which always downloads the latest Version of Windows or any other platform and language (replace Windows with other operating systems and English with any other language).

     

    url4wd7c.png

  5. You can try using curl to send login data:

    http://curl.haxx.se/docs/httpscripting.html#User_name_and_password
    

    Or you can use wget e.g. this way:

    start "" /wait wget −−user=YourUserName −−password=YourPassword –output-document="{root}{outputFilename}"

    There are two possibilities using wget. You can submit −−user=YourPassword and −−password=YourPassword for both FTP and HTTP connections or you can use it for a specific protocol. For HTTP −−http−user=YourPassword and −−http−password=YourPassword and for FTP connections  −−ftp−user=YourPassword and −−ftp−password=YourPassword (see wget docs).

  6. You're welcome! I don't know about the development progress but as far as I know Flo is working on the next version.

    curl is a good point. You can download curl from here and put the curl.exe and libcurl.dll into your Ketarin folder and create a global variable called curl.

    globalvariablesdodgs.png

    You can execute it like {curl} -d "{postdata}" {link} before or after downloading something, where {postdata} = your POST variable/value and {link} the link you want to send your data to. This is the way i use curl most of the time.

     

    Regarding shared apps. As far as I remember this version of the online database is not the final one and suggestions are welcome. I will try to post all the helpful forum entries to the wiki. But I need some time :)

  7. Got it! Example for DiffMerge:

     

    First of all you need the name of the site called by the download form. If you watch the source code of https://sourcegear.com/diffmerge/downloads.php you will find the line

    <form id="DMdownload" name="DMdownload" method="post" action="downloaded.php">

    The action part is what we are looking for. So our site we want to POST data to is called downloaded.php

    The second thing we need is the POST data itself. Scroll the source code down to the form section. There you will find your POST data. For this download they use radio buttons. What we need now is the names and the values of our files.

                    <input type="radio" name="DMdownloadVersion" value="win_installer_64" checked />...
                    <input type="radio" name="DMdownloadVersion" value="win_installer_32" />...
                    <input type="radio" name="DMdownloadVersion" value="win_program_64" />...
                    <input type="radio" name="DMdownloadVersion" value="win_program_32" />...
                    <input type="radio" name="DMdownloadVersion" value="mac_pkg" />...
                    <input type="radio" name="DMdownloadVersion" value="mac_dmg" />...
                    <input type="radio" name="DMdownloadVersion" value="ubuntu_64" />...
                    <input type="radio" name="DMdownloadVersion" value="ubuntu_32" />...
                    <input type="radio" name="DMdownloadVersion" value="fedora_64" />...
                    <input type="radio" name="DMdownloadVersion" value="fedora_32" />...
    

    Now it is time for our variables:

     

     

     

    Version (self-explanatory):

     

    Contents from URL:

    https://sourcegear.com/diffmerge/downloads.php
    

    Use regular expression:

     (?<=Download DiffMerge )[0-9.]{2,}

    versionjkfgu.png

     

     

     

     

    Download URL (The download URL is the site we want to "POST" data to.):

     

    Contents from URL:

    https://sourcegear.com/diffmerge/downloaded.php
    

    Use regular Expression:

     Problems with the download.*?href="(.+?)"

    url7ycmm.png

     

     

     

     

    POST data (Depending on the file you want to download.):

     

    Name:

    DMdownloadVersion

    Value:

    One of the values (files you wish to download) from the radion button section.
    

    postdataqauwv.png

     

     

     

     

    File (Use {url} as download link to be more flexible.):

    downloadxvupe.png

  8. Hi iliaszou! Is this what you are looking for?

     

    Before downloading:

    MOVE /Y "{file:directory}\Patch.exe" "%TEMP%"

    After downloading:

    MOVE /Y "%TEMP%\Patch.exe" "{file:directory}\"

    As far as I remember you need a backslash after {file:directory}

     

    And if you want to keep it 100% portable, create a temp directory in your file directory and delete it after your file was downloaded:

     

     

    Before downloading:

    MD "{file:directory}\temp"
    MOVE /Y "{file:directory}\patch.exe" "{file:directory}\temp\"

    After downloading:

    MOVE /Y "{file:directory}\temp\patch.exe" "{file:directory}\"
    RMDIR /S /Q "{file:directory}\temp"
  9. I don't know if it works (I have to perform some tests), but as a suggestion you can try using curl to "pre-download" the file. To do this, use this line of code in your pre-command field:

    "{curl}" -d "{post}" "http://www.cdisplayex.com/dl/" -o "{file:directory}\{url:basefile}.{url:ext}"
    

    cbr32aop3y.png

     

    {curl} = global variable with name curl and value curl.exe (Place your curl.exe into the folder containing Ketarin.exe.)

     

    globala2qpb.png

     

     

    {post} = a variable containing your POST data. For 32-bit use os=win32 and for 64-bit use os=win64

     

    postdlsi1.png

  10. Maybe something like the following. Quick and dirty but it works as long as they keep the most recent download on top.

    SO if you always want the latest build you can easily check for the first version number given on the site.

     

    version check:

    version4is89.png

     

    download url:

    downloadpgs62.png

     

    final url:

    urlguib7.png

     

    app with final url:

    app2qqch.png

     

    You can also check the online database and search for Pcsx2 ;)

  11. {root} is the variable you are looking for (see all the special variables).

     

    For more flexibility you can create a global variable (File -> Settings or CTRL + T), select Global variables and create a variable with the path you wish to use for all your downloads. For me it is one  variable called downloads1 with path Downloads and the second one called path with path {root}\{downloads1}\{category}\. For me thats the most flexible way to manage my pathes. If I want to use a second database or another folder to save my files to, I create a new variable called downloads2 pointing to another folder...

  12. That's how i use it to archive some files.

    globalvarsqxy75.png

    To avoid redundant usage of pathes, create global variables. For 7zip copy the 7z.dll and 7z.exe to your Ketarin folder, create a global variable called 7z and point it to your 7z.exe
    Create a second global variable called archived and point it to {root}\archived or chose any other path.

     

    My batch code:

    IF NOT EXIST "{archived}\{appname}" (
      MD "{archived}\{appname}"
    )
    
    "{7z}" u -t7z -mx9 "{file:directory}\{yyyy}{MM}{dd}.7z" "{file}"
    
    MOVE /Y "{file:directory}\*.7z" "{archived}\{appname}"
    
    

    And I use the time stamp ({yyyy}{MM}{dd}) for naming my archives...

     

    To get back to your problem. Have you checked the log file (CTRL+L) for errors?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.