how to call other exe file in Eprime?
David McFarlane
mcfarla9 at msu.edu
Mon Nov 5 19:20:06 UTC 2007
At 11/3/2007 11:28 PM Saturday, Chunhui Chen wrote:
>Hi, I used to write Visual Basic scripts and now I want to use
>Eprime. But i don't know how to call executive function in Eprime.
>
>Here is want I wrote in VB
>(1) declare function
>Public Declare Function ShellExecute Lib "shell32.dll" Alias _
>"ShellExecuteA" _
>(ByVal hWnd As Long, ByVal lpOperation As String, _
>ByVal lpFile As String, _
>ByVal lpParameters As String, _
>ByVal lpDirectory As String, _
>ByVal nShowCmd As Long) As Long
>(2) call executive file
>ShellExecute(NULL,"open","calc.exe",NULL,NULL,SW_SHOWNORMAL);
Have you just tried this in E-Prime? This looks very much like what
I did several years ago to get direct access to the Windows API in
order to use some extra keyboard functions (that was before I learned
that I could do the same thing by testing for key offsets <g>).
The whole "Public Declare ..." stuff works just like in VB, of course
you have to put your .dll file in the right place, etc. But I don't
know anything about ShellExecute, perhaps that is where you're getting stuck.
Is there some compelling reason that you need to call external
executables instead of just making your whole experiment work in "the
E-Prime" way?
---
David McFarlane, Systems Designer
Dept. Psychology, Michigan State University
mcfarla9 at msu.edu www.msu.edu/~mcfarla9
Voice: (517) 353-0799 Fax: (517) 353-1652
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime-unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---
More information about the Eprime
mailing list