#uselib "user32.dll"
#func WindowFromPoint "WindowFromPoint" sptr,sptr #func GetClassName "GetClassNameA" int,var,int #cfunc RegisterWindowMessage "RegisterWindowMessageA" sptr #func SendMessageTimeout "SendMessageTimeoutA" int,int,int,int,int,int,int #uselib "oleacc.dll" #uselib "oleacc.dll" #func ObjectFromLresult "ObjectFromLresult" int,int,int,int #uselib "OLE32.DLL" #func CLSIDFromString "CLSIDFromString" wstr,int #define IID_IHTMLDocument "{626FC520-A41E-11CF-A731-00A0C9082637}" dim tGUID,4 sdim szName, 256 input szName,300,20 *@ repeat wait 10 WindowFromPoint ginfo_mx,ginfo_my : hw=stat GetClassName hw,szName, 256 if szName="Internet Explorer_Server"{break} loop *aa ms = RegisterWindowMessage ("WM_HTML_GETOBJECT") #define SMTO_ABORTIFHUNG $00000002 SendMessageTimeOut hw,ms,0,0,SMTO_ABORTIFHUNG,1000,varptr(lRes) CLSIDFromString IID_IHTMLDocument,varptr(tGUID) newcom pDoc ObjectFromLresult lRes,varptr(tGUID),0,varptr(pDoc) if pDoc("title")!="クイックメール(メール確認)":goto *@b if pDoc("ReadyState")!="complete" :goto *@b a = pDoc("getElementById","get") if varuse(a)==0:goto *@b b = a("getElementsByTagName", "input") c = b("item", 0) objprm 0, c("value") delcom c delcom b delcom a delcom pDoc wait 1 goto *aa
>http://15qm.com/?act=sevin&inm=di
ここのURL内のinput内を取得しているのですが
そのURLを開き取得後ブラウザを消すと 内部エラーがでてしまいます。
オブジェクトの初期化に失敗しました。
あるいは、変数型の初期化に失敗しました
とでるんですがどう対処すればよいでしょうか?
エラーラインは
if pDoc("title")!="クイックメール(メール確認)":goto *@bこのあたりです・・
if pDoc("ReadyState")!="complete" :goto *@b a = pDoc("getElementById","get")