Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Embed Google Translate Website, Prompt Website Security Issue
#4
translate function working for meĀ  so dont know the problem


Maybe something like this will work
Function WebTranslator
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x10CF0A48 0x100 0 0 900 432 "Web Translator"
;3 ActiveX 0x54000000 0x4 12 20 236 154 "SHDocVw.WebBrowser"
;4 Button 0x54032001 0x4 0 0 48 14 "Back"
;5 Button 0x54032000 0x4 48 0 48 14 "Forward"
;6 Button 0x54032000 0x0 96 0 48 14 "Stop"
;7 Button 0x54032000 0x0 144 0 48 14 "Refresh"
;8 Button 0x54032000 0x0 192 0 48 14 "Home"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""

str controls = "3"
str ax3SHD
WebBrowserControlDisableIE7Emulation
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,SHDocVw.WebBrowser we3
,we3._getcontrol(id(3 hDlg))
,we3.Silent=TRUE ;;prevent script error messages
,;we3.Navigate("http://www.microsofttranslator.com/bv.aspx?from=&to=zh-CHT&a=http%3A%2F%2Fwww.quickmacros.com%2Fhelp%2Fleft.htm");;Chinese Traditional
,we3.Navigate("http://www.microsofttranslator.com/bv.aspx?from=&to=zh-CHS&a=http%3A%2F%2Fwww.quickmacros.com%2Fhelp%2Fleft.htm") ;;Chinese Simplified
,case WM_SIZE
,RECT r; DpiGetWindowRect(hDlg &r)
,MoveWindow id(3 hDlg) 0 30 r.right r.bottom-30 1
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case [4,5,6,7,8]
,err-
,we3._getcontrol(id(3 hDlg))
,sel wParam
,,case 4 we3.GoBack
,,case 5 we3.GoForward
,,case 6 we3.Stop
,,case 7 we3.Refresh
,,case 8 we3.GoHome
,err+    
,case IDOK
,case IDCANCEL
ret 1
   


Messages In This Thread
RE: Embed Google Translate Website, Prompt Website Security Issue - by Kevin - 05-21-2018, 02:54 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)