Problems with copying text of programs for users of IE are well-known.
Today I wrote a small utility (see warning inside the text).
You press Ctrl-C and start this program (I put an icon on Task Bar).
[This message has been edited by Semen Matusovski (edited March 08, 2000).]
Today I wrote a small utility (see warning inside the text).
You press Ctrl-C and start this program (I put an icon on Task Bar).
Code:
#Compile Exe #Register None #Dim All #Include "Win32Api.Inc" '--------------- CHANGE PATHES, IF NECESSARY --------------- $DirSamples = "C:\PBDLL60\Samples\" $DirWordPad = "G:\Program Files\Windows NT\Accessories\" '----------------------------------------------------------- Sub SendKbd (hwnd As Long, key1 As Long, key2 As Long) KeyBd_Event key1, MapVirtualKey(key1, 0), 0, 0: Sleep 0 KeyBd_Event key2, MapVirtualKey(key2, 0), 0, 0: Sleep 0 KeyBd_Event key2, MapVirtualKey(key2, 0), %KEYEVENTF_KEYUP, 0: Sleep 0 KeyBd_Event key1, MapVirtualKey(key1, 0), %KEYEVENTF_KEYUP, 0: Sleep 0 End Sub Function PbMain() Dim TmpName As String, hDlg As Long, nTest As Long, lResult As Long TmpName$ = $DirSamples + "~Tmp.Bas" Open TmpName$ For Output As #1: Close #1 lResult = Shell ($DirWordPad + "Wordpad.exe " + TmpName$) For nTest = 1 To 100 hDlg = FindWindow(ByVal 0, "~Tmp - WordPad") '-- In some OSes it's necessary to change to --------------- ' hDlg = FindWindow(ByVal 0, "~Tmp.Bas - WordPad") '----------------------------------------------------------- If hDlg <> 0 Then Exit For Sleep 100 Next If hDlg = 0 Then MsgBox "Not found": Exit Function SetForegroundWindow hDlg SendKbd hDlg&, %VK_CONTROL, 86 ' Ctrl-V SendKbd hDlg&, %VK_CONTROL, 83 ' Ctrl-S '--- Depends of PC ----------------------------------------- Sleep 1000 '-- in non-English releases could be Alt-J and so on ------- SendKbd hDlg&, %VK_MENU, 89 ' Alt-Y '----------------------------------------------------------- SendKbd hDlg&, %VK_MENU, %VK_F4 ' Alt-F4 lResult& = Shell("PbEdit.Exe " + TmpName$) End Function
Comment