another mac to Windows gotcha

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

another mac to Windows gotcha

J. Landman Gay via use-livecode
Hi,

Trying my first little LC app on Windows. I wrote an app on osx
and am now trying to get it to work in a Win7 machine.

On the mac app, I use ctrl-J, ctrl-K, and ctrl-L to control the
video player. JKL is pretty standard video player control in
video editing software.

On the mac app, the card script 'listens' for controlkeydown, and
if the other key is J K or L, sends the appropriate go, stop,
reverse command to the player.

Have just discovered controlkeydown is not available on windows.
Is there an equivalent? What would the windows guy and gals here use?

Thanks,

Tim Selander
Tokyo, Japan

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: another mac to Windows gotcha

J. Landman Gay via use-livecode
controlKeyDown is absolutely available on Windows. See the dictionary
entry in LC8.1.9 for example. What version of LiveCode are you using?


On 2/24/2018 9:04 AM, Tim Selander via use-livecode wrote:

> Hi,
>
> Trying my first little LC app on Windows. I wrote an app on osx and am
> now trying to get it to work in a Win7 machine.
>
> On the mac app, I use ctrl-J, ctrl-K, and ctrl-L to control the video
> player. JKL is pretty standard video player control in video editing
> software.
>
> On the mac app, the card script 'listens' for controlkeydown, and if
> the other key is J K or L, sends the appropriate go, stop, reverse
> command to the player.
>
> Have just discovered controlkeydown is not available on windows. Is
> there an equivalent? What would the windows guy and gals here use?
>
> Thanks,
>
> Tim Selander
> Tokyo, Japan
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: another mac to Windows gotcha

J. Landman Gay via use-livecode
Hi Paul,

Using 9.0 dp11 community. After sending the post, I found in the
dictionary that for windows, commandkeydown message. After
changing my script from controlkeydown to commandkeydown, it
worked. Sort of.

My next problem is that on the LC/osx I use:
   if pkeyname is "j" then set the playrate of player videoplayer
to -1
   if pkeyname is "k" then set the playrate of player videoplayer
to 0
   if pkeyname is "l" then set the playrate of player videoplayer
to 1

to start, stop or reverse the player from the keyboard. This
worked great in LC/osx, but is not working in win7/LC.

I changed the lines to
   if pkeyname is "k" then stop player videoplayer
   if pkeyname is "l" then start player videoplayer

and that works in win7/lc. But can't figure out how to send a
play in reverse command from the keyboard yet.

Tim Selander
Tokyo, Japan


On 2018.02.24 23:44, Paul Dupuis via use-livecode wrote:

> controlKeyDown is absolutely available on Windows. See the dictionary
> entry in LC8.1.9 for example. What version of LiveCode are you using?
>
>
> On 2/24/2018 9:04 AM, Tim Selander via use-livecode wrote:
>> Hi,
>>
>> Trying my first little LC app on Windows. I wrote an app on osx and am
>> now trying to get it to work in a Win7 machine.
>>
>> On the mac app, I use ctrl-J, ctrl-K, and ctrl-L to control the video
>> player. JKL is pretty standard video player control in video editing
>> software.
>>
>> On the mac app, the card script 'listens' for controlkeydown, and if
>> the other key is J K or L, sends the appropriate go, stop, reverse
>> command to the player.
>>
>> Have just discovered controlkeydown is not available on windows. Is
>> there an equivalent? What would the windows guy and gals here use?
>>
>> Thanks,
>>
>> Tim Selander
>> Tokyo, Japan
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: another mac to Windows gotcha

J. Landman Gay via use-livecode
Tim,

Try both commands in order: set playRate, then start.

Peter Bogdanoff

> On Feb 24, 2018, at 10:16 AM, Tim Selander via use-livecode <[hidden email]> wrote:
>
> Hi Paul,
>
> Using 9.0 dp11 community. After sending the post, I found in the dictionary that for windows, commandkeydown message. After changing my script from controlkeydown to commandkeydown, it worked. Sort of.
>
> My next problem is that on the LC/osx I use:
>  if pkeyname is "j" then set the playrate of player videoplayer to -1
>  if pkeyname is "k" then set the playrate of player videoplayer to 0
>  if pkeyname is "l" then set the playrate of player videoplayer to 1
>
> to start, stop or reverse the player from the keyboard. This worked great in LC/osx, but is not working in win7/LC.
>
> I changed the lines to
>  if pkeyname is "k" then stop player videoplayer
>  if pkeyname is "l" then start player videoplayer
>
> and that works in win7/lc. But can't figure out how to send a play in reverse command from the keyboard yet.
>
> Tim Selander
> Tokyo, Japan
>
>
>> On 2018.02.24 23:44, Paul Dupuis via use-livecode wrote:
>> controlKeyDown is absolutely available on Windows. See the dictionary
>> entry in LC8.1.9 for example. What version of LiveCode are you using?
>>
>>
>>> On 2/24/2018 9:04 AM, Tim Selander via use-livecode wrote:
>>> Hi,
>>>
>>> Trying my first little LC app on Windows. I wrote an app on osx and am
>>> now trying to get it to work in a Win7 machine.
>>>
>>> On the mac app, I use ctrl-J, ctrl-K, and ctrl-L to control the video
>>> player. JKL is pretty standard video player control in video editing
>>> software.
>>>
>>> On the mac app, the card script 'listens' for controlkeydown, and if
>>> the other key is J K or L, sends the appropriate go, stop, reverse
>>> command to the player.
>>>
>>> Have just discovered controlkeydown is not available on windows. Is
>>> there an equivalent? What would the windows guy and gals here use?
>>>
>>> Thanks,
>>>
>>> Tim Selander
>>> Tokyo, Japan
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: another mac to Windows gotcha

J. Landman Gay via use-livecode
Hi Peter,

Tried
if pkeyname is "j" then
set the playrate of player videoplayer to -1
start player videplayer
end if

Results in a pause in playback as long as I am holding ctrl-j, as
soon as that's released, forward play resumes.

Thanks.

Tim


On 2018.02.25 0:26, Peter Bogdanoff via use-livecode wrote:

> Tim,
>
> Try both commands in order: set playRate, then start.
>
> Peter Bogdanoff
>
>> On Feb 24, 2018, at 10:16 AM, Tim Selander via use-livecode <[hidden email]> wrote:
>>
>> Hi Paul,
>>
>> Using 9.0 dp11 community. After sending the post, I found in the dictionary that for windows, commandkeydown message. After changing my script from controlkeydown to commandkeydown, it worked. Sort of.
>>
>> My next problem is that on the LC/osx I use:
>>   if pkeyname is "j" then set the playrate of player videoplayer to -1
>>   if pkeyname is "k" then set the playrate of player videoplayer to 0
>>   if pkeyname is "l" then set the playrate of player videoplayer to 1
>>
>> to start, stop or reverse the player from the keyboard. This worked great in LC/osx, but is not working in win7/LC.
>>
>> I changed the lines to
>>   if pkeyname is "k" then stop player videoplayer
>>   if pkeyname is "l" then start player videoplayer
>>
>> and that works in win7/lc. But can't figure out how to send a play in reverse command from the keyboard yet.
>>
>> Tim Selander
>> Tokyo, Japan
>>
>>
>>> On 2018.02.24 23:44, Paul Dupuis via use-livecode wrote:
>>> controlKeyDown is absolutely available on Windows. See the dictionary
>>> entry in LC8.1.9 for example. What version of LiveCode are you using?
>>>
>>>
>>>> On 2/24/2018 9:04 AM, Tim Selander via use-livecode wrote:
>>>> Hi,
>>>>
>>>> Trying my first little LC app on Windows. I wrote an app on osx and am
>>>> now trying to get it to work in a Win7 machine.
>>>>
>>>> On the mac app, I use ctrl-J, ctrl-K, and ctrl-L to control the video
>>>> player. JKL is pretty standard video player control in video editing
>>>> software.
>>>>
>>>> On the mac app, the card script 'listens' for controlkeydown, and if
>>>> the other key is J K or L, sends the appropriate go, stop, reverse
>>>> command to the player.
>>>>
>>>> Have just discovered controlkeydown is not available on windows. Is
>>>> there an equivalent? What would the windows guy and gals here use?
>>>>
>>>> Thanks,
>>>>
>>>> Tim Selander
>>>> Tokyo, Japan
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> [hidden email]
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: another mac to Windows gotcha

J. Landman Gay via use-livecode
Hi Tim,

I am not sure if the DirectShow player (with is the API used by the LC
player on Windows) supports negative playrate:

https://msdn.microsoft.com/en-us/library/windows/desktop/dd377591(v=vs.85).aspx

There is also a bug report about it:

http://quality.livecode.com/show_bug.cgi?id=19129

Best,
Panos
--

On Sat, Feb 24, 2018 at 3:32 PM, Tim Selander via use-livecode <
[hidden email]> wrote:

> Hi Peter,
>
> Tried
> if pkeyname is "j" then
> set the playrate of player videoplayer to -1
> start player videplayer
> end if
>
> Results in a pause in playback as long as I am holding ctrl-j, as soon as
> that's released, forward play resumes.
>
> Thanks.
>
> Tim
>
>
>
> On 2018.02.25 0:26, Peter Bogdanoff via use-livecode wrote:
>
>> Tim,
>>
>> Try both commands in order: set playRate, then start.
>>
>> Peter Bogdanoff
>>
>> On Feb 24, 2018, at 10:16 AM, Tim Selander via use-livecode <
>>> [hidden email]> wrote:
>>>
>>> Hi Paul,
>>>
>>> Using 9.0 dp11 community. After sending the post, I found in the
>>> dictionary that for windows, commandkeydown message. After changing my
>>> script from controlkeydown to commandkeydown, it worked. Sort of.
>>>
>>> My next problem is that on the LC/osx I use:
>>>   if pkeyname is "j" then set the playrate of player videoplayer to -1
>>>   if pkeyname is "k" then set the playrate of player videoplayer to 0
>>>   if pkeyname is "l" then set the playrate of player videoplayer to 1
>>>
>>> to start, stop or reverse the player from the keyboard. This worked
>>> great in LC/osx, but is not working in win7/LC.
>>>
>>> I changed the lines to
>>>   if pkeyname is "k" then stop player videoplayer
>>>   if pkeyname is "l" then start player videoplayer
>>>
>>> and that works in win7/lc. But can't figure out how to send a play in
>>> reverse command from the keyboard yet.
>>>
>>> Tim Selander
>>> Tokyo, Japan
>>>
>>>
>>> On 2018.02.24 23:44, Paul Dupuis via use-livecode wrote:
>>>> controlKeyDown is absolutely available on Windows. See the dictionary
>>>> entry in LC8.1.9 for example. What version of LiveCode are you using?
>>>>
>>>>
>>>> On 2/24/2018 9:04 AM, Tim Selander via use-livecode wrote:
>>>>> Hi,
>>>>>
>>>>> Trying my first little LC app on Windows. I wrote an app on osx and am
>>>>> now trying to get it to work in a Win7 machine.
>>>>>
>>>>> On the mac app, I use ctrl-J, ctrl-K, and ctrl-L to control the video
>>>>> player. JKL is pretty standard video player control in video editing
>>>>> software.
>>>>>
>>>>> On the mac app, the card script 'listens' for controlkeydown, and if
>>>>> the other key is J K or L, sends the appropriate go, stop, reverse
>>>>> command to the player.
>>>>>
>>>>> Have just discovered controlkeydown is not available on windows. Is
>>>>> there an equivalent? What would the windows guy and gals here use?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Tim Selander
>>>>> Tokyo, Japan
>>>>>
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> [hidden email]
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> [hidden email]
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode