... this:
PROCEDURE CreateLNKShortcut(cLnkPath, cURL)
LOCAL oShell, oShortcut
// Initialize COM (if not already done)
IF !Empty(GetActiveObject("WScript.Shell"))
oShell := CreateObject("WScript.Shell")
ELSE
? "COM initialization failed."
RETURN
ENDIF
// Create the shortcut
oShortcut ...
Search found 40 matches: wscript
Searched query: wscript
- Sat Feb 08, 2025 8:35 pm
- Forum: FiveWin for Harbour/xHarbour
- Topic: Create shortcut for accessing URL
- Replies: 5
- Views: 1722
- Sun Nov 17, 2024 5:14 pm
- Forum: FiveWin for Harbour/xHarbour
- Topic: emulate CTRL+V
- Replies: 7
- Views: 1478
Re: emulate CTRL+V
Try using WScript
lc_oShell := tOleAuto():New( "WScript.Shell" )
lc_oShell:SendKeys("^V")
Thanks. This is working for me.
This is my test:
#include "fivewin.ch"
#define WM_PASTE 770
function Main()
local oDlg, oBar, oGet
local cText := Space( 100 )
SetGetColorFocus()
DEFINE DIALOG oDlg ...
lc_oShell := tOleAuto():New( "WScript.Shell" )
lc_oShell:SendKeys("^V")
Thanks. This is working for me.
This is my test:
#include "fivewin.ch"
#define WM_PASTE 770
function Main()
local oDlg, oBar, oGet
local cText := Space( 100 )
SetGetColorFocus()
DEFINE DIALOG oDlg ...
- Sun Nov 17, 2024 1:43 pm
- Forum: FiveWin for Harbour/xHarbour
- Topic: emulate CTRL+V
- Replies: 7
- Views: 1478
Re: emulate CTRL+V
Try using WScript
Code: Select all | Expand
lc_oShell := tOleAuto():New( "WScript.Shell" )
lc_oShell:SendKeys("^V")
- Tue Nov 14, 2023 2:06 pm
- Forum: FiveWin for Harbour/xHarbour
- Topic: ID of the new process
- Replies: 2
- Views: 617
Re: ID of the new process
... ExecQuery("Select * from Win32_Process Where Name = 'winword.exe'")
For Each objProcess In colProcesses
Set objOwner = objProcess.GetOwner()
WScript.Echo "Process ID: " & objProcess.ProcessId
WScript.Echo "Owner: " & objOwner.User
Next
```
This may not directly give you the ID of the ...
For Each objProcess In colProcesses
Set objOwner = objProcess.GetOwner()
WScript.Echo "Process ID: " & objProcess.ProcessId
WScript.Echo "Owner: " & objOwner.User
Next
```
This may not directly give you the ID of the ...
- Thu Oct 12, 2023 11:18 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: enviar mensajes a whatsapp, ¿posible solucion?
- Replies: 55
- Views: 11978
Re: enviar mensajes a whatsapp, ¿posible solucion?
... VBA, etc
Simplemente usa esto desde FWH en un bucle:
ShellExecute( 0, "open", StrTran( "whatsapp://send?phone=" + cTelefono + "&text=" + cMensaje ), " ", "%20" ) )
SysRefresh() // ó SysWait( 5 ) prueba con distintos valores hasta que te funcione bien
CreateObject( "WScript.Shell" ):SendKeys( "~" )
Simplemente usa esto desde FWH en un bucle:
ShellExecute( 0, "open", StrTran( "whatsapp://send?phone=" + cTelefono + "&text=" + cMensaje ), " ", "%20" ) )
SysRefresh() // ó SysWait( 5 ) prueba con distintos valores hasta que te funcione bien
CreateObject( "WScript.Shell" ):SendKeys( "~" )
- Thu Jun 01, 2023 7:05 am
- Forum: FiveWin para Harbour/xHarbour
- Topic: Envió de teclas/pulsaciones a una aplicación externa.
- Replies: 2
- Views: 528
Re: Envió de teclas/pulsaciones a una aplicación externa.
Hola João,
Ya estaba probando con WScript.Shell, veremos hasta donde llego.
De momento voy avanzando, creo que me servirá.
Para enviar pocos whatsapp seguramente servirá, para muchos (*).. veremos como se los come y como reacciona la pantalla web; deberé jugar con Sleep() en la rutina de envío para ...
Ya estaba probando con WScript.Shell, veremos hasta donde llego.
De momento voy avanzando, creo que me servirá.
Para enviar pocos whatsapp seguramente servirá, para muchos (*).. veremos como se los come y como reacciona la pantalla web; deberé jugar con Sleep() en la rutina de envío para ...
- Thu Mar 03, 2022 11:56 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: Envio de Correo con Archivos adjuntos
- Replies: 3
- Views: 411
Envio de Correo con Archivos adjuntos
... cCommand + "body=" + Chr(34) + cBody + Chr(34) + ","
cCommand = cCommand + "attachment=" + Chr(34) + cAtach1 + Chr(34)
oShell:=CreateObject("WScript.Shell")
WinExec( cCommand, 0 )
Lo envia sin problema, pero como adjunto 2 o mas archivos al mismo correo ?, ya lo intente comprimiendo en ZIP ...
cCommand = cCommand + "attachment=" + Chr(34) + cAtach1 + Chr(34)
oShell:=CreateObject("WScript.Shell")
WinExec( cCommand, 0 )
Lo envia sin problema, pero como adjunto 2 o mas archivos al mismo correo ?, ya lo intente comprimiendo en ZIP ...
- Thu Dec 09, 2021 4:39 pm
- Forum: FiveWin for Harbour/xHarbour
- Topic: Name of the user
- Replies: 3
- Views: 594
Re: Name of the user
Thanks, ADutheil !
To prevent the Powershell shell window from appearing, the script must be run through Wscript and cmd.exe .
Of course, I made a flag DBF, where each launching application locks its own line.
But it seemed to me that by viewing all processes through WMI, you can find out the name ...
To prevent the Powershell shell window from appearing, the script must be run through Wscript and cmd.exe .
Of course, I made a flag DBF, where each launching application locks its own line.
But it seemed to me that by viewing all processes through WMI, you can find out the name ...
- Thu Aug 20, 2020 2:17 am
- Forum: FiveWin para Harbour/xHarbour
- Topic: Ejecutar llamada a servicio.
- Replies: 16
- Views: 2698
Ejecutar llamada a servicio.
... do.bat"....)
Me genera todo menos la impresion del vale. He probado TODAS las combinaciones de nMode y nada de nada.
Alguna idea o tip por donde ir...
hasta probe
oShell := CreateObject( "WScript.Shell" )
oShell:Run( "%comspec% /c start do.bat", 0, .T.)
.....sin resultados.
Desde Chile
Saludos
Me genera todo menos la impresion del vale. He probado TODAS las combinaciones de nMode y nada de nada.
Alguna idea o tip por donde ir...
hasta probe
oShell := CreateObject( "WScript.Shell" )
oShell:Run( "%comspec% /c start do.bat", 0, .T.)
.....sin resultados.
Desde Chile
Saludos
- Fri Dec 06, 2019 11:32 am
- Forum: FiveWin for Harbour/xHarbour
- Topic: shellexec or winexec
- Replies: 5
- Views: 963
Re: shellexec or winexec
... 0
ENDIF
IF ValType( lWait ) != "L"
lWait := .T.
ENDIF
IF ValType( lShowResult ) != "L"
lShowResult := .F.
ENDIF
oShell := CreateObject( "WScript.Shell" )
IF !GetEnv( "OS" ) == "Windows_NT"
cComando += "start " + cComando
ENDIF
TRY
nRetorno := oShell:Run( "%comspec% /c " + cComando, nStyle ...
ENDIF
IF ValType( lWait ) != "L"
lWait := .T.
ENDIF
IF ValType( lShowResult ) != "L"
lShowResult := .F.
ENDIF
oShell := CreateObject( "WScript.Shell" )
IF !GetEnv( "OS" ) == "Windows_NT"
cComando += "start " + cComando
ENDIF
TRY
nRetorno := oShell:Run( "%comspec% /c " + cComando, nStyle ...
- Wed Dec 04, 2019 8:14 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: Acceso denegado (SOLUCIONADO)
- Replies: 2
- Views: 596
Re: Acceso denegado
... ENDIF
IF ValType( lWait ) != "L"
lWait := .T.
ENDIF
IF ValType( lShowResult ) != "L"
lShowResult := .F.
ENDIF
oShell := CreateObject( "WScript.Shell" )
IF !GetEnv( "OS" ) == "Windows_NT"
cComando += "start " + cComando
ENDIF
TRY
nRetorno := oShell:Run( "%comspec% /c " + cComando ...
IF ValType( lWait ) != "L"
lWait := .T.
ENDIF
IF ValType( lShowResult ) != "L"
lShowResult := .F.
ENDIF
oShell := CreateObject( "WScript.Shell" )
IF !GetEnv( "OS" ) == "Windows_NT"
cComando += "start " + cComando
ENDIF
TRY
nRetorno := oShell:Run( "%comspec% /c " + cComando ...
- Tue Jun 11, 2019 6:44 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: Consulta Para Antonio Linares (Mensaje a Wathsapp)
- Replies: 38
- Views: 9391
Re: Consulta Para Antonio Linares (Mensaje a Wathsapp)
... Function Whatsapp(cDe, cPara, cmsg)
Local clink := "wppredirect.tk/go/?p=55"+cPara+"&m=Envio"+cDe // 55 brasil
oShell := CreateObject( "WScript.Shell" )
oShell:run(uRegPath+"\chrome\chrome.exe "+clink )
syswait(5)
oShell:SendKeys("~")
syswait(2)
oShell:SendKeys("Ola mundo")
oShell ...
Local clink := "wppredirect.tk/go/?p=55"+cPara+"&m=Envio"+cDe // 55 brasil
oShell := CreateObject( "WScript.Shell" )
oShell:run(uRegPath+"\chrome\chrome.exe "+clink )
syswait(5)
oShell:SendKeys("~")
syswait(2)
oShell:SendKeys("Ola mundo")
oShell ...
- Sat Nov 17, 2018 5:32 pm
- Forum: FiveWin for Harbour/xHarbour
- Topic: Wscript.shell
- Replies: 2
- Views: 621
Re: Wscript.shell
Thank you my friend...Works great.
- Sat Nov 17, 2018 4:51 pm
- Forum: FiveWin for Harbour/xHarbour
- Topic: Wscript.shell
- Replies: 2
- Views: 621
Re: Wscript.shell
Code: Select all | Expand
? WshShell:SpecialFolders:Item("Desktop")
- Sat Nov 17, 2018 1:05 am
- Forum: FiveWin for Harbour/xHarbour
- Topic: Wscript.shell
- Replies: 2
- Views: 621
Wscript.shell
... to utilize this object to manipulate VM's on my server. I am starting simple:
Function TestCreateShortCut()
Local WshShell := CreateObject("Wscript.shell")
Local cSpecialFolder := WshShell:SpecialFolders("Desktop")
MsgInfo( cSpecialFolder,"Special Folder" )
Return nil
This Errors on the ...
Function TestCreateShortCut()
Local WshShell := CreateObject("Wscript.shell")
Local cSpecialFolder := WshShell:SpecialFolders("Desktop")
MsgInfo( cSpecialFolder,"Special Folder" )
Return nil
This Errors on the ...