#Warn, All, MsgBox
sServer := "firefox" ; iexplore, opera
sTopic := "WWW_GetWindowInfo"
sItem := "0xFFFFFFFF"
idInst := DdeInitialize()
hServer := DdeCreateStringHandle(idInst, sServer)
hTopic := DdeCreateStringHandle(idInst, sTopic )
hItem := DdeCreateStringHandle(idInst, sItem )
hConv := DdeConnect(idInst, hServer, hTopic)
hData := DdeClientTransaction(0x20B0, hConv, hItem)
sData := DdeAccessData(hData)
DdeFreeStringHandle(idInst, hServer)
DdeFreeStringHandle(idInst, hTopic )
DdeFreeStringHandle(idInst, hItem )
DdeUnaccessData(hData)
DdeFreeDataHandle(hData)
DdeDisconnect(hConv)
DdeUninitialize(idInst)
RegExMatch(sData, "(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?", sData)
Firefoxurlout := sData
DdeInitialize(pCallback = 0, nFlags = 0)
{
DllCall("DdeInitialize", "UintP", idInst, "Uint", pCallback, "Uint", nFlags, "Uint", 0)
Return idInst
}
DdeUninitialize(idInst)
{
Return DllCall("DdeUninitialize", "Uint", idInst)
}
DdeConnect(idInst, hServer, hTopic, pCC = 0)
{
Return DllCall("DdeConnect", "Uint", idInst, "Uint", hServer, "Uint", hTopic, "Uint", pCC)
}
DdeDisconnect(hConv)
{
Return DllCall("DdeDisconnect", "Uint", hConv)
}
DdeAccessData(hData)
{
Return DllCall("DdeAccessData", "Uint", hData, "Uint", 0, "str")
}
DdeUnaccessData(hData)
{
Return DllCall("DdeUnaccessData", "Uint", hData)
}
DdeFreeDataHandle(hData)
{
Return DllCall("DdeFreeDataHandle", "Uint", hData)
}
DdeCreateStringHandle(idInst, sString, nCodePage = 1004) ; CP_WINANSI = 1004
{
Return DllCall("DdeCreateStringHandle", "Uint", idInst, "Uint", &sString, "int", nCodePage)
}
DdeFreeStringHandle(idInst, hString)
{
Return DllCall("DdeFreeStringHandle", "Uint", idInst, "Uint", hString)
}
DdeClientTransaction(nType, hConv, hItem, sData = "", nFormat = 1, nTimeOut = 10000) ; CF_TEXT = 1
{
Return DllCall("DdeClientTransaction", "Uint", sData = "" ? 0 : &sData, "Uint", sData = "" ? 0 : StrLen(sData)+1, "Uint", hConv, "Uint", hItem, "Uint", nFormat, "Uint", nType, "Uint", nTimeOut, "UintP", nResult)
}
can anybody fix that ?




