Skip to content

I need to refresh and activate some project from command line

Hi,

I need to refresh GSA to show my imported project and make it active, all of this by command line, its possible?

Comments

  • SvenSven www.GSA-Online.de
    sendmessage(<handle of SER>, 1042, 0, 0);
  • @Sven can you please give more information about what you said...

    Thanks

  • @botman, I think what sven said is enough already. Just create something that calls the 'sendmessage' from windows. then also get the ser handle, and send the WM_USER + xx = 1042. I think that's self-explanatory
  • dmrt i have no idea what are you talking about. Would you mind explain more detailed please...

    How we can control SER from command line, as this was OP asked...
  • One of the best ways to do this is to restart GSA SER gracefuly with nircmd:

    Here is an example batch file for use in Windows. Make sure nircmd is in the same directory as the batch file. Copy and paste this and save as restart_gsa.bat

    ECHO.
    ECHO Attempting to close GSA SER gracefully...
    nircmd closeprocess Search_Engine_Ranker.exe 
    nircmd wait 20000
    ECHO.
    ECHO 2000 milliseconds waited...
    ECHO.
    taskkill /F /IM Search_Engine_Ranker.exe /T
    nircmd wait 20000
    ECHO.
    ECHO 2000 milliseconds waited...
    cd "C:\Program Files (x86)\GSA Search Engine Ranker\"
    START Search_Engine_Ranker.exe -autostart
  • coneh34d said is correct if you are looking for something that you can just run through command line.
  • @sven that sendmessage is for refreshing?
    How to make some specific project (the new one that shows when refresh) to be the active one?

    Thanks all for your help :)
  • I did not found the active project in the ini file, where are they stored?
  • SvenSven www.GSA-Online.de
    @yenerich sendmessage is a windows api and that particular message 1042 with no parameters is telling SER to refresh it's listing.
  • edited August 2014
    @sven Yes, i am a programmer, i know about SendMessage, thanks. In fact i already test it, thanks.

    The only thing i havent found is how to set one project as active or inactive.
    Maybe another message, a command line or some change in some ini file?
  • SvenSven www.GSA-Online.de
    you have to set that in the project file itself before doing a refresh.
  • @Sven in the .prj file? Where?
  • SvenSven www.GSA-Online.de

    [options]

    last status=...

  • edited August 2014
    @Sven,thanks :)

    I saw all project (active and inactive) to have last status=64.
    Which is the active?
  • SvenSven www.GSA-Online.de
    you can as well write "last status=active"
    Thanked by 1Deeeeeeee
  • You are the man!! :)
  • To change project from active to inactive, what should we change last status= to? I have tried 0, 64, Inactive, and inactive.

    If anyone or @Sven knows, please let me know too :-)

    Thank you for the support.
  • SvenSven www.GSA-Online.de
    use this:
    prj_mode_normal=0; prj_mode_verify_only=1; prj_mode_verify_email_only=2; prj_mode_site_list_only=4; prj_mode_pause=8; prj_mode_stopping=16; prj_mode_search_only=32; prj_mode_search_verify=prj_mode_search_only or prj_mode_verify_only; prj_mode_inactive=64; prj_mode_del_links=128; prj_mode_reverify=256; prj_mode_del_links_from_file=512;
  • Sven said:
    sendmessage(<handle of SER>, 1042, 0, 0);

    Hello @Sven - sorry to revive such an old thread. I'm using Python's win32api to refresh the SER project list after externally generating a new .prj file:

    win32api.SendMessage(hwnd, 1042, 0, 0)

    Works to refresh the project list, but this causes all the running GSA projects to come to a stop. Can I start GSA again without closing/reopening the executable - or even better check the current state of "Start" or "Stop" first so that I can set it back to the original state?

    Thank you



  • Well, seems there's a brain-dead simple solution to this. Just calling it twice. That will reset GSA to it's original state - Started or Stopped. LOL

    Thank you
Sign In or Register to comment.