topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • November 19, 2019, 07:07 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - relipse [ switch to compact view ]

Pages: prev1 2 [3] 4next
51
N.A.N.Y. 2013 / Re: NANY 2013 PLEDGE - Contractor's Work Log
« on: November 20, 2012, 06:11 PM »
---------------------------
Work Log Timer
---------------------------
The system cannot find the file specified.
---------------------------

As far as this error is concerned, if you run the .exe as an Administrator, do you still get this problem?
I am still trying to figure out why it would fail.

52
N.A.N.Y. 2013 / Re: NANY 2013 PLEDGE - Contractor's Work Log
« on: November 20, 2012, 05:56 PM »
Hi Jim

I dont think the first error is permissions - I have it in
C:\Portable\WorkLogGui
got the same error from
F:\Temp\WorkLogGui
(I also tried it with the "_0887" at the end of the folder name with no difference.)

Should the ini file store my username and password? It doesnt automatically.
I added them manually - now I get the screen like first image in OP, but I'm not logged in nor are my details aren't filled in.

Before that I didnt get any image - just the two fields and a login button.

The only way to store your username and password is to go to the Server tab in Preferences, you have to save it THERE first (simply logging in will not do it)

I think you are using a later version of IE which complains about a focusing issue that I used to have (the time log notes used to be visible) I fixed this, but am working on some other stuff before I upload the changes

53
N.A.N.Y. 2013 / Re: NANY 2013 PLEDGE - Contractor's Work Log
« on: November 20, 2012, 11:40 AM »
When I click stop (and add comment) the GUI reverts to showing 'Start' but does not reflect the work just done in the time/cost shown.
When I click Start again - it then shows the work that was done in the previous stint.

Yeah this has annoyed me for quite a while but I never went ahead and fixed it, thanks
it is on the list.

As far as the other errors, the app needs to create/modify the ini file so if you don't have proper permissions that could mess it up. I have mine running from my c drive (something like c:\utility\cpp\worklog\) so I haven't had any problems yet (I too am on Windows 7)


Be sure to try out using the hotkey Alt-` to start/stop and auto-idle-time detection , that is one reason I have been using the windows version instead of the pure web version
Jim

Also as far as the script error can you help me reproduce it?

54
N.A.N.Y. 2013 / Re: NANY 2013 PLEDGE - Contractor's Work Log
« on: November 19, 2012, 08:10 PM »
Yes the app is just a client wrapper to the website, look in the preferences section under Server -> Base URL to make sure it is pointed to http://cworklog.com/

facelift.jpg

55
N.A.N.Y. 2013 / Re: NANY 2013 PLEDGE - Contractor's Work Log
« on: November 18, 2012, 12:58 PM »
Did anyone try the GUI for Microsoft Windows?
downloadable client is here: http://cworklog.com/.../WorkLogGui_0887.zip
Jim

56
N.A.N.Y. 2013 / Re: NANY 2013 PLEDGE - Contractor's Work Log
« on: November 17, 2012, 02:08 PM »
Yeah F5 isn't friends with the timer pop up window. Check to see if there are entries in the time log

57
N.A.N.Y. 2013 / Re: NANY 2013 PLEDGE - Contractor's Work Log
« on: November 09, 2012, 01:19 AM »

hi relipse
I'm trying the website :)

1) When I try to open the timer (clock icon) in a new tab (via the context menu) I just get another instance of the main window.
I dont like popups because I tend to forget them - I use FF with session saver - and if I close the window and the popup is in the back, session saver no longer remembers the tabs in the window I just closed...


I went ahead and fixed this, you should be able to right click and open in new tab or window, but a pop up window works the best (callbacks etc)

58
N.A.N.Y. 2013 / Re: NANY 2013 PLEDGE - Contractor's Work Log
« on: November 08, 2012, 05:04 PM »
yeah i'm not sure what i was thinking about when i created the "actual hours" feature
just sort of a verification of how much you worked what you want to bill for.
Personally I just copy the calculated hours directly over there at the end of the week.

59
N.A.N.Y. 2013 / Re: NANY 2013 PLEDGE - Contractor's Work Log
« on: November 08, 2012, 02:27 PM »
Looks very nice. It doesn't seem to want to accept input in the actual hours field. I'll enter a number, but it always reverts back to 0. I've tried hitting enter and tabbing out of the field but neither seems to work. Editing start and stop times also seems to be a problem. I doubleclick as directed but nothing happens. Probably just something I don't understand how to do.

I'm using Firefox 16.0.2


This problem is fixed, it happened because mysql in windows is NOT case sensitive and i accidentally had a capital L in my database name. In linux this failed as an invalid table.

Thank you so much for testing this out for me.

60
N.A.N.Y. 2013 / Re: NANY 2013 PLEDGE - Contractor's Work Log
« on: November 08, 2012, 11:37 AM »
Likewise with the Price Rate field - I'm unable to change this for a log.
The number remains the same and I get the message:
'no work log found'

I logged out and in again to make sure my work log was really there (it's still there!).


Wow, I just check this, this is a serious problem (it doesn't happen on my localhost but it does on cworklog.com for some reason)

Update: This problem has been fixed, i had a captial L in my table name and my windows box didn't detect it, but my linux hosting server did.
Thank you
ReLipse

61
N.A.N.Y. 2013 / Re: NANY 2013 PLEDGE - Contractor's Work Log
« on: November 08, 2012, 10:59 AM »
hi relipse
I'm trying the website :)

1) When I try to open the timer (clock icon) in a new tab (via the context menu) I just get another instance of the main window.
I dont like popups because I tend to forget them - I use FF with session saver - and if I close the window and the popup is in the back, session saver no longer remembers the tabs in the window I just closed...



Yes, this is due to the onclick="" mechanism. Right now it only works for a pop up window, but allowing it to work in a tab is a good idea. Thanks



2) I'm unable to delete a company - keeps going from the second confirmation dialogue back to the first.

Thank you for the bug submission, I just indeed fixed this and uploaded a new delete.php. Please try it again

62
N.A.N.Y. 2013 / Re: NANY 2013 PLEDGE - Contractor's Work Log
« on: November 06, 2012, 03:21 PM »
I added pictures above
thank you

63
N.A.N.Y. 2013 / Re: NANY 2013 PLEDGE - Contractor's Work Log
« on: November 06, 2012, 02:30 PM »
Thank you for your response,
You can use username: test116 and password test116

But it is very easy to create a new account (email verification is disabled so don't worry about it)
Here you go
http://cworklog.com/...ame_or_email=test116

64
N.A.N.Y. 2013 / NANY 2013 PLEDGE - Contractor's Work Log
« on: November 06, 2012, 12:13 AM »
https://cworklog.com

New
Now with HTTPS Secure, so you don't have to worry about your login credentials or time information being passed in plain text

facelift.jpg

mainwhammy.jpg

Well, I recently started doing contract programming and I needed a utility to track all my time. I honestly didn't research into it very long when I started building one on my own php webserver.

Nonetheless, I made it available to the public

The Web version is here: https://cworklog.com you can login using
username: test116
password: test116

or just register free for an account (email verification is off)

Windows GUI Client

and the downloadable client is here: https://cworklog.com...orkLogGUI.latest.zip

65
Feature Request:

Voice Recognition Addon With FARR

FARR
say "FAR Robot" to open
start talking
it "types" what you say into the text box

Jim

66
Thanks to the tons of articles and open source code, this would not be possible.
Well, lets say we want to add Scripting support -- specifically JavaScript support, in other words, the user can install a script to customize your application, the key is having a language, and an engine to parse it.
Well, because the TCppWebBrowser component is just an activex control that puts an Internet Explorer control on your app, we can use the scripting engine embedded within IE to do all our dirty work.

Once you drop a TCppWebBrowser on your form, and hide it away behind some other components, name it WebScripter or something.

Well, now we will need some basic utilities, number one, is a way to execute scripts, which you can use a few methods to do it,
one is to load an html page with that script included in the html, or just have a <script>my script</script>, or my favorite, after the TCppWebBrowser component loads and navigates to its first page, we can use the function below to execute javascript inside the currently loaded document (it must exist, do a Web->Navigate(L"about:blank"); if you need to)
bool TCppWebBrowserUtils::ExecJs(TCppWebBrowser *Web, WideString cmd)
{
 IHTMLDocument2  *doc = NULL;
 IHTMLWindow2 *win;
 if (!Web->Document){ return false; }
 bool success_status = false;
 if(SUCCEEDED(Web->Document->QueryInterface(IID_IHTMLDocument2, (LPVOID*)&doc)))  {
   HRESULT hr = doc->get_parentWindow(&win);
   if (SUCCEEDED(hr))  {
     VARIANT v;
     VariantInit(&v);
     win->execScript(cmd,NULL,&v);
     VariantClear(&v);
     win->Release();
     success_status = true;
   }
   doc->Release();
 }
 return success_status;
}


Ok, now that we got that, we are ready to execute custom scripts, load it from a file, drag and drop, or whatever, then pass it to the function above.

But you may be wondering, what is so special about this? We get all the cool things that JavaScript comes with such as regular expressions, substrings, the tons of functions on the internet that we can add.

Now, how can the user control our application?
The key is, window.external, which is what we are going to implement next.

At this time, you can compile your application, and execute some javascript, but we still need to add an implementation for window.external

The idea of window.external , is to be able to call non-script code, so that the user can execute C++ code by using a method of window.external.YourAppDoSomethingCool();

Well, how exactly do we get functions attached?
First of all, we need our own IDocHostUIHandler to attach to the WebBrowser component.
We can do this by adding a new class as below:

Spoiler
 //The below class lets you replace the right click menu, as well as attach functionality to window.external (SetExternal())
  // Simple implementation for IDocHostUIHandler and IUnknown interfaces
  // Implementation returns E_NOTIMPL for all IDocHostUIHandler methods except
  // ShowContextMenu. See comment block preceeding that ShowContxtMenu for
  // further information.
  class MyDocHandler :public IDocHostUIHandler
  {
    long refcount;
    IDispatch* External;
  public:
    TPopupMenu* PopupMenu;
    bool ShowIEPopup;
  public:
    //*Accessors
    void SetExternal(IDispatch* Ext)
    {
        if(External)
            External->Release();

        External = Ext;

        if(External)
            External->AddRef();
    }

    IDispatch* GetExternal()
    {
        return External;
    }

  public:

    MyDocHandler() :refcount(1), External(NULL), PopupMenu(NULL), ShowIEPopup(true){ }

    virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID classid, void** intf) {
      if (classid == IID_IUnknown)
        *intf = (IUnknown*)this;
      else if (classid == IID_IDocHostUIHandler)
        *intf = (IDocHostUIHandler*)this;
      else
        return E_NOINTERFACE;
      return S_OK;
    }

    virtual ULONG STDMETHODCALLTYPE AddRef() {
      InterlockedIncrement(&refcount);
      return refcount;
    }

    virtual ULONG STDMETHODCALLTYPE Release() {
      InterlockedDecrement(&refcount);
      if (refcount == 0)
        delete this;
      return refcount;
    }

    // Returning S_OK tells the web browser that it need not display its
    // own context menu, presumably because the application hosting it has
    // displayed its own menu to replace it.
    // Since our host does not display any, no context menu is shown.
    virtual HRESULT STDMETHODCALLTYPE ShowContextMenu(
      /* [in] */ DWORD dwID,
      /* [in] */ POINT __RPC_FAR *ppt,
      /* [in] */ IUnknown __RPC_FAR *pcmdtReserved,
      /* [in] */ IDispatch __RPC_FAR *pdispReserved) {


          if (PopupMenu)
          {
             PopupMenu->Popup(ppt->x, ppt->y);
             return S_OK;
          }
          else if (!ShowIEPopup)
          { //don't show one at all
            return S_OK;
          }
          else{  //if there is no pop up menu, just use the default ie one
            return E_NOTIMPL;
          }

      }

    virtual HRESULT STDMETHODCALLTYPE GetHostInfo(
      /* [out][in] */ DOCHOSTUIINFO __RPC_FAR *pInfo) {
          return E_NOTIMPL;
      }

    virtual HRESULT STDMETHODCALLTYPE ShowUI(
      /* [in] */ DWORD dwID,
      /* [in] */ IOleInPlaceActiveObject __RPC_FAR *pActiveObject,
      /* [in] */ IOleCommandTarget __RPC_FAR *pCommandTarget,
      /* [in] */ IOleInPlaceFrame __RPC_FAR *pFrame,
      /* [in] */ IOleInPlaceUIWindow __RPC_FAR *pDoc) {
          return E_NOTIMPL;
      }

    virtual HRESULT STDMETHODCALLTYPE HideUI( void) {
          return E_NOTIMPL;
      }

    virtual HRESULT STDMETHODCALLTYPE UpdateUI( void) {
          return E_NOTIMPL;
      }

    virtual HRESULT STDMETHODCALLTYPE EnableModeless(
      /* [in] */ BOOL fEnable) {
          return E_NOTIMPL;
      }

    virtual HRESULT STDMETHODCALLTYPE OnDocWindowActivate(
      /* [in] */ BOOL fActivate) {
          return E_NOTIMPL;
      }

    virtual HRESULT STDMETHODCALLTYPE OnFrameWindowActivate(
      /* [in] */ BOOL fActivate) {
          return E_NOTIMPL;
      }

    virtual HRESULT STDMETHODCALLTYPE ResizeBorder(
      /* [in] */ LPCRECT prcBorder,
      /* [in] */ IOleInPlaceUIWindow __RPC_FAR *pUIWindow,
      /* [in] */ BOOL fRameWindow) {
          return E_NOTIMPL;
      }

    virtual HRESULT STDMETHODCALLTYPE TranslateAccelerator(
      /* [in] */ LPMSG lpMsg,
      /* [in] */ const GUID __RPC_FAR *pguidCmdGroup,
      /* [in] */ DWORD nCmdID) {
          return E_NOTIMPL;
      }

    virtual HRESULT STDMETHODCALLTYPE GetOptionKeyPath(
      /* [out] */ LPOLESTR __RPC_FAR *pchKey,
      /* [in] */ DWORD dw) {
          return E_NOTIMPL;
      }

    virtual HRESULT STDMETHODCALLTYPE GetDropTarget(
      /* [in] */ IDropTarget __RPC_FAR *pDropTarget,
      /* [out] */ IDropTarget __RPC_FAR *__RPC_FAR *ppDropTarget) {
          return E_NOTIMPL;
      }

    virtual HRESULT STDMETHODCALLTYPE GetExternal(
      /* [out] */ IDispatch __RPC_FAR *__RPC_FAR *ppDispatch) {
        if(ppDispatch == NULL)
            return E_POINTER;

        // make sure currently loaded doc is safe
        //if(!UrlSafeForExternal(WebBrowser->LocationURL))
        //    return E_NOTIMPL;

        if(External) {
            *ppDispatch = External;
            (*ppDispatch)->AddRef();
            return S_OK;
        }
        return E_NOTIMPL;
      }

    virtual HRESULT STDMETHODCALLTYPE TranslateUrl(
      /* [in] */ DWORD dwTranslate,
      /* [in] */ OLECHAR __RPC_FAR *pchURLIn,
      /* [out] */ OLECHAR __RPC_FAR *__RPC_FAR *ppchURLOut) {
          return E_NOTIMPL;
      }

    virtual HRESULT STDMETHODCALLTYPE FilterDataObject(
      /* [in] */ IDataObject __RPC_FAR *pDO,
      /* [out] */ IDataObject __RPC_FAR *__RPC_FAR *ppDORet) {
          return E_NOTIMPL;
      }
  };


The trick is, that this inherits from IDocHostUIHandler, and thus implements the virtual functions,
each function can return a few different types, E_NOTIMPL means you did not change anything, and you want the default behavior, whereas S_OK means you handled it -- like the popup menu
You really don't need to know much more if you want to see it in action, we still have to add our own interface:

#ifndef CppScripterH
#define CppScripterH
//---------------------------------------------------------------------------
#include <OleCtrls.hpp>
#include <SHDocVw_OCX.h>
#include <mshtml.h>
#include <mshtmhst.h>
#include "TCppWebBrowserUtils.h"

//This actually contains the functions that will be added to
//window.external
class IBrowserExternal
{
public:
    TStringList* GlobalVariables;  //initalized and freed outside of this class
public:
    IBrowserExternal():GlobalVariables(NULL){};
    ~IBrowserExternal() {};

    //currently the only functions are window.external.SetVar() and window.external.GetVar() as implemented below
    virtual void STDMETHODCALLTYPE SetVar(BSTR key, BSTR val)
    {
        GlobalVariables->Values[AnsiString(key)] = val;
    }
    virtual BSTR STDMETHODCALLTYPE GetVar(BSTR key)
    {
        return (WideString)GlobalVariables->Values[key];
    }
};

The above code is important, it is the class that will be used to store all the methods you want inside of window.external,
the above code only has 2 methods, GetVar() and SetVar(), a useful way to pass information between the script and your app.
Notice how it returns BSTR, and accepts BSTR, that is a string type in javascript, or a WideString() in BCB. Get used to it, you can cast between WideString() and AnsiString() to do string manipulation.


We also need the below code to basically attach the method invocation directly to our methods (i put the above and below code in the same .h file),


class TExternalDispatch : public IDispatch
{
public:
    TExternalDispatch();
    ~TExternalDispatch();
    // IUnknown
    virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID classid, void** intf);
    virtual ULONG STDMETHODCALLTYPE AddRef();
    virtual ULONG STDMETHODCALLTYPE Release();

    //IDispatch
    virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT* pctinfo);

    virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(/* [in] */ UINT iTInfo,
        /* [in] */ LCID lcid,
        /* [out] */ ITypeInfo** ppTInfo);

    virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(
        /* [in] */ REFIID riid,
        /* [size_is][in] */ LPOLESTR *rgszNames,
        /* [in] */ UINT cNames,
        /* [in] */ LCID lcid,
        /* [size_is][out] */ DISPID *rgDispId);

    virtual HRESULT STDMETHODCALLTYPE Invoke(
        /* [in] */ DISPID dispIdMember,
        /* [in] */ REFIID riid,
        /* [in] */ LCID lcid,
        /* [in] */ WORD wFlags,
        /* [out][in] */ DISPPARAMS  *pDispParams,
        /* [out] */ VARIANT  *pVarResult,
        /* [out] */ EXCEPINFO *pExcepInfo,
        /* [out] */ UINT *puArgErr);

private:
    long refcount;
    IBrowserExternal* BrowserExternal;
    ITypeInfo* TypeInfo;
public:
    IBrowserExternal* getBrowserExternal(){ return BrowserExternal; }
};

#endif

We will also need more code in the .cpp file
Notice, this is extremely important, we must define all of the type information about our new methods:

//put this in the .cpp file to add window.external.SetVar() and GetVar()

//this describes the parameters SetVar() takes 2 string parameters, a key and value
static PARAMDATA rgpSetVar[] =
{
    { OLESTR("key"), VT_BSTR},
    { OLESTR("val"), VT_BSTR}
};

//GetVar() only takes 1 string, the key
static PARAMDATA rgpGetVar[] =
{
    { OLESTR("key"), VT_BSTR}
};

//for each function, weneed to add the code below
enum IMETH_ExtDisp
{
    IMETH_SetVar = 0,
    IMETH_GetVar
};

//likewise for this also
enum IDMEMBER_ExtDisp
{
    IDMEMBER_SetVar = DISPID_VALUE,
    IDMEMBER_GetVar
};

//now, see if you can figure this out -- this is the method data -- how it figures out how to call our member functions
//Get used to copying and pasting for each member function, the # represents the number of parameters
//the last item represents the return type VT_BSTR for string, VT_EMPTY for void, VT_INT for int, etc,
//look on the documentation
static METHODDATA rgmdataExtDisp[] =
{
    { OLESTR("SetVar"),           rgpSetVar,          IDMEMBER_SetVar,           IMETH_SetVar,         CC_CDECL, 2, DISPATCH_METHOD, VT_EMPTY },
    { OLESTR("GetVar"),           rgpGetVar,          IDMEMBER_GetVar,           IMETH_GetVar,         CC_CDECL, 1, DISPATCH_METHOD, VT_BSTR }
}

/* IDispatch class for our interface */

TExternalDispatch::TExternalDispatch()
:   refcount(1),
    BrowserExternal(NULL),
    TypeInfo(NULL)
{
    BrowserExternal = new IBrowserExternal();
    CreateDispTypeInfo(&idataExtDisp, LOCALE_SYSTEM_DEFAULT, &TypeInfo);
}

TExternalDispatch::~TExternalDispatch()
{
    if(TypeInfo)
        TypeInfo->Release();

    delete BrowserExternal;
}

/* IUnknown */

HRESULT STDMETHODCALLTYPE TExternalDispatch::QueryInterface(REFIID classid, void** intf)
{
    if(intf == NULL)
        return E_INVALIDARG;

    if (classid == IID_IDispatch || classid == IID_IUnknown) {
        AddRef();
        *intf = this;
        return S_OK;
    }

    *intf = NULL;
    return E_NOINTERFACE;
}

ULONG STDMETHODCALLTYPE TExternalDispatch::AddRef()
{
    InterlockedIncrement(&refcount);
    return refcount;
}

ULONG STDMETHODCALLTYPE TExternalDispatch::Release()
{
    InterlockedDecrement(&refcount);
    if (refcount == 0) {
        delete this;
        return 0;
    }
    return refcount;
}

/* IDispatch */

HRESULT STDMETHODCALLTYPE TExternalDispatch::GetTypeInfoCount(
    UINT* pctinfo)
{
    if(TypeInfo == NULL)
        return E_NOTIMPL; // shouldn't happen

    if(pctinfo == NULL)
        return E_INVALIDARG;

    *pctinfo = 1;

return S_OK;
}

HRESULT STDMETHODCALLTYPE TExternalDispatch::GetTypeInfo(
    /* [in] */ UINT iTInfo,
    /* [in] */ LCID lcid,
    /* [out] */ ITypeInfo** ppTInfo)
{
    if(TypeInfo == NULL)
        return E_NOTIMPL; // shouldn't happen

    if(iTInfo != 0)
        return DISP_E_BADINDEX;

    if(ppTInfo == NULL)
        return E_INVALIDARG;

    TypeInfo->AddRef();
    *ppTInfo = TypeInfo;

return S_OK;
}

HRESULT STDMETHODCALLTYPE TExternalDispatch::GetIDsOfNames(
    /* [in] */ REFIID riid,
    /* [size_is][in] */ OLECHAR** rgszNames,
    /* [in] */ UINT cNames,
    /* [in] */ LCID lcid,
    /* [size_is][out] */ DISPID* rgDispId)
{
    if(TypeInfo == NULL)
        return E_NOTIMPL; // shouldn't happen

    return TypeInfo->GetIDsOfNames(rgszNames, cNames, rgDispId);
}

HRESULT STDMETHODCALLTYPE TExternalDispatch::Invoke(
    /* [in] */ DISPID dispIdMember,
    /* [in] */ REFIID /*riid*/,
    /* [in] */ LCID /*lcid*/,
    /* [in] */ WORD wFlags,
    /* [out][in] */ DISPPARAMS* pDispParams,
    /* [out] */ VARIANT* pVarResult,
    /* [out] */ EXCEPINFO* pExcepInfo,
    /* [out] */ UINT* puArgErr)
{
    if(TypeInfo == NULL)
        return E_NOTIMPL; // shouldn't happen

    return TypeInfo->Invoke(BrowserExternal, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
}


Ok and finally we actually have to connect the pieces, note this is not complete code, you have to copy each part into the designated section
#include "External.h"
#include "TCppWebBrowserUtils.h"

//form variables:
MyDocHandler* scriptdochandler;
TExternalDispatch* webscripter_external;
THashedStringList* GlobalVariables;

//now add in constructor
webscripter_external = new TExternalDispatch();
scriptdochandler = new MyDocHandler();
GlobalVariables = new THashedStringList();


now find a good place to do the below, after of course we've ensured that Document exists and Navigate(L"about:blank"); or something

//after we load the first document CppWebBrowser1->Document will be NULL until we do a Navigate()

ICustomDoc *custdoc;
CppWebBrowser1->Document->QueryInterface(&custdoc);

//change the popupmenu
//dochandler->PopupMenu = PopupMenu;

//enable Global Variables
webscripter_external->getBrowserExternal()->GlobalVariables = GlobalVariables;

//allow pages to call window.external. (this might be a security flaw)
scriptdochandler->SetExternal(webscripter_external);

if (custdoc)
{
   custdoc->SetUIHandler(scriptdochandler);
   custdoc->Release();
}


put this in the destructor, or OnClose() or whatever
//now don't forget to free memory
delete webscripter_external;
delete scriptdochandler;
delete GlobalVariables; //perhaps let them persist? -- save to file?


Wala!!, now go ahead and try it out:
String js = "window.external.SetVar('foo','bar');";
ExecJs(WebScripter, js);
ExecJs(WebScripter, L"alert(window.external.GetVar('foo'));");

You can add more methods that take integers and strings and boolean


67
We should!!!

68
FARR Plugins and Aliases / Re: KlipKeeper (A FARR2 Plugin by hamradio)
« on: September 17, 2009, 04:51 PM »
thanks for the plugin,
I really like it, the ding makes me feel special when i copy to clipboard knowing it is saved!

69
open source, we can easily make a mod for donationcoders =)

70
i tried it out, much fun, but how exactly do you turn key board keys into clicks?

71
Living Room / Re: The 150 Best Online Flash Games
« on: October 09, 2008, 01:49 AM »
that programming light game is fun, thanks!

72
i tried all these games and they are all somewhat challenging fun fun

73
funny you mention hedgewars, i just got done with Wormux, an open source worms clone with network play,
check it out www.wormux.org

i downloaded hedgewars and got a white screen behind all of the hedgehogs when trying to play, not sure why =(

pretty much unplayable, anyone else have the same problems?

74
Living Room / Re: One answered question before you died
« on: October 08, 2008, 11:56 PM »
why didn't i turn to God earlier in my life?

75
Borland C++ Builder Contest / Re: FlashCard Pro
« on: September 09, 2006, 08:48 AM »
Yeah thanks for the help,
it is only a firefox problem..
I contacted the programmer of HTML Helpmatic pro and told him how to fix it
in the mean time, i am going to use regex buddy to regex replace all the files

peace,
relipse

Pages: prev1 2 [3] 4next