Re: Dropping file on an LC standalone...

2024-03-22 Thread Craig Newman via use-livecode
Klaus.

AHA. I did, but did not see past the fact that the “$” keyword took parameters.

Craig

> On Mar 22, 2024, at 8:56 AM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi Craig,
> 
>> Am 22.03.2024 um 13:44 schrieb Craig Newman via use-livecode 
>> mailto:use-livecode@lists.runrev.com>>:
>> 
>> What on earth is the “1$ special variable”?
> 
> well, 1$ sounds like a good bargain for a "special variable"! :-D
> 
> Actually it is -> $1
> Look up $ in the dictionary for further information.
> 
>> Craig
>> 
>>> On Mar 21, 2024, at 6:58 PM, Bob Sneidar via use-livecode 
>>>  wrote:
>>> 
>>> Wow I just read that and it didn’t even make sense to me!
>>> 
>>> Basically with Windows, dragging a file onto a taskbar icon only adds the 
>>> file to the icon’s Pinned items. Dragging a file onto an open window of an 
>>> App will try and open the file in that app. If the app’s window(s) are 
>>> hidden, dragging and hovering over the app’s shortcut will cause the app to 
>>> show it’s window(s) whereupon you can drop the file onto the open window.
>>> 
>>> Bob S
>>> 
>>> 
>>> On Mar 21, 2024, at 3:46 PM, Bob Sneidar via use-livecode 
>>>  wrote:
>>> 
>>> Does it have to be the icon? If I drag a file onto an app in the Windows 
>>> Tack Bar it does nothing, even if the file belongs to the app I am dragging 
>>> the file onto. If however I HOVER on the icon and the app is running, it 
>>> will bring the app to the front and show the frontmost window if it is 
>>> hidden.
>>> 
>>> If I drag the file onto the open Window, the app will open it. Case in 
>>> point, drag an Excel spreadsheet onto the Excel icon in the task bar. All 
>>> it will do is add a shortcut to the Excel icon for that file. But launch 
>>> Excel, open a blank spreadsheet, then drag an excel file onto the icon, 
>>> hover, then drop onto the blank Excel Spreadsheet. In THIS case it will 
>>> open the spreadsheet in a new window.
>>> 
>>> Because of this you may be able to use a Drag / Drop handler in your card 
>>> script. The caveat is that the card itself will not accept a drag/drop 
>>> action, but if you drag anything on top of an actual object, THEN the card 
>>> will get the message.
>>> 
>>> So to handle this, add an opaque rectangle the size of the card behind 
>>> everything else (if the opacity is set to 99 it will appear transparent for 
>>> all intents and purposes). The rectangle (or any other object on the card 
>>> that doesn’t have a dragDrop handler) will get the message and it will fall 
>>> through to the card where you can handle it.
>>> 
>>> This in my card script:
>>> 
>>> on dragEnter
>>> set the dragAction to "link" -- for files
>>> pass dragEnter
>>> end dragEnter
>>> 
>>> on dragDrop
>>> put the dragData into tDragData
>>> set the dragData to empty
>>> -- do something with tDragData
>>> end dragDrop
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> https://www.major-k.de 
> https://www.major-k.de/bass
> kl...@major-k.de 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com 
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Dropping file on an LC standalone...

2024-03-22 Thread Klaus major-k via use-livecode
Hi Craig,

> Am 22.03.2024 um 13:44 schrieb Craig Newman via use-livecode 
> :
> 
> What on earth is the “1$ special variable”?

well, 1$ sounds like a good bargain for a "special variable"! :-D

Actually it is -> $1
Look up $ in the dictionary for further information.

> Craig
> 
>> On Mar 21, 2024, at 6:58 PM, Bob Sneidar via use-livecode 
>>  wrote:
>> 
>> Wow I just read that and it didn’t even make sense to me!
>> 
>> Basically with Windows, dragging a file onto a taskbar icon only adds the 
>> file to the icon’s Pinned items. Dragging a file onto an open window of an 
>> App will try and open the file in that app. If the app’s window(s) are 
>> hidden, dragging and hovering over the app’s shortcut will cause the app to 
>> show it’s window(s) whereupon you can drop the file onto the open window.
>> 
>> Bob S
>> 
>> 
>> On Mar 21, 2024, at 3:46 PM, Bob Sneidar via use-livecode 
>>  wrote:
>> 
>> Does it have to be the icon? If I drag a file onto an app in the Windows 
>> Tack Bar it does nothing, even if the file belongs to the app I am dragging 
>> the file onto. If however I HOVER on the icon and the app is running, it 
>> will bring the app to the front and show the frontmost window if it is 
>> hidden.
>> 
>> If I drag the file onto the open Window, the app will open it. Case in 
>> point, drag an Excel spreadsheet onto the Excel icon in the task bar. All it 
>> will do is add a shortcut to the Excel icon for that file. But launch Excel, 
>> open a blank spreadsheet, then drag an excel file onto the icon, hover, then 
>> drop onto the blank Excel Spreadsheet. In THIS case it will open the 
>> spreadsheet in a new window.
>> 
>> Because of this you may be able to use a Drag / Drop handler in your card 
>> script. The caveat is that the card itself will not accept a drag/drop 
>> action, but if you drag anything on top of an actual object, THEN the card 
>> will get the message.
>> 
>> So to handle this, add an opaque rectangle the size of the card behind 
>> everything else (if the opacity is set to 99 it will appear transparent for 
>> all intents and purposes). The rectangle (or any other object on the card 
>> that doesn’t have a dragDrop handler) will get the message and it will fall 
>> through to the card where you can handle it.
>> 
>> This in my card script:
>> 
>> on dragEnter
>> set the dragAction to "link" -- for files
>> pass dragEnter
>> end dragEnter
>> 
>> on dragDrop
>> put the dragData into tDragData
>> set the dragData to empty
>> -- do something with tDragData
>> end dragDrop

Best

Klaus

--
Klaus Major
https://www.major-k.de
https://www.major-k.de/bass
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Dropping file on an LC standalone...

2024-03-22 Thread Craig Newman via use-livecode
What on earth is the “1$ special variable”?

Craig

> On Mar 21, 2024, at 6:58 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Wow I just read that and it didn’t even make sense to me!
> 
> Basically with Windows, dragging a file onto a taskbar icon only adds the 
> file to the icon’s Pinned items. Dragging a file onto an open window of an 
> App will try and open the file in that app. If the app’s window(s) are 
> hidden, dragging and hovering over the app’s shortcut will cause the app to 
> show it’s window(s) whereupon you can drop the file onto the open window.
> 
> Bob S
> 
> 
> On Mar 21, 2024, at 3:46 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Does it have to be the icon? If I drag a file onto an app in the Windows Tack 
> Bar it does nothing, even if the file belongs to the app I am dragging the 
> file onto. If however I HOVER on the icon and the app is running, it will 
> bring the app to the front and show the frontmost window if it is hidden.
> 
> If I drag the file onto the open Window, the app will open it. Case in point, 
> drag an Excel spreadsheet onto the Excel icon in the task bar. All it will do 
> is add a shortcut to the Excel icon for that file. But launch Excel, open a 
> blank spreadsheet, then drag an excel file onto the icon, hover, then drop 
> onto the blank Excel Spreadsheet. In THIS case it will open the spreadsheet 
> in a new window.
> 
> Because of this you may be able to use a Drag / Drop handler in your card 
> script. The caveat is that the card itself will not accept a drag/drop 
> action, but if you drag anything on top of an actual object, THEN the card 
> will get the message.
> 
> So to handle this, add an opaque rectangle the size of the card behind 
> everything else (if the opacity is set to 99 it will appear transparent for 
> all intents and purposes). The rectangle (or any other object on the card 
> that doesn’t have a dragDrop handler) will get the message and it will fall 
> through to the card where you can handle it.
> 
> This in my card script:
> 
> on dragEnter
>  set the dragAction to "link" -- for files
>  pass dragEnter
> end dragEnter
> 
> on dragDrop
>  put the dragData into tDragData
>  set the dragData to empty
>  -- do something with tDragData
> end dragDrop
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Dropping file on an LC standalone...

2024-03-21 Thread Bob Sneidar via use-livecode
Wow I just read that and it didn’t even make sense to me!

Basically with Windows, dragging a file onto a taskbar icon only adds the file 
to the icon’s Pinned items. Dragging a file onto an open window of an App will 
try and open the file in that app. If the app’s window(s) are hidden, dragging 
and hovering over the app’s shortcut will cause the app to show it’s window(s) 
whereupon you can drop the file onto the open window.

Bob S


On Mar 21, 2024, at 3:46 PM, Bob Sneidar via use-livecode 
 wrote:

Does it have to be the icon? If I drag a file onto an app in the Windows Tack 
Bar it does nothing, even if the file belongs to the app I am dragging the file 
onto. If however I HOVER on the icon and the app is running, it will bring the 
app to the front and show the frontmost window if it is hidden.

If I drag the file onto the open Window, the app will open it. Case in point, 
drag an Excel spreadsheet onto the Excel icon in the task bar. All it will do 
is add a shortcut to the Excel icon for that file. But launch Excel, open a 
blank spreadsheet, then drag an excel file onto the icon, hover, then drop onto 
the blank Excel Spreadsheet. In THIS case it will open the spreadsheet in a new 
window.

Because of this you may be able to use a Drag / Drop handler in your card 
script. The caveat is that the card itself will not accept a drag/drop action, 
but if you drag anything on top of an actual object, THEN the card will get the 
message.

So to handle this, add an opaque rectangle the size of the card behind 
everything else (if the opacity is set to 99 it will appear transparent for all 
intents and purposes). The rectangle (or any other object on the card that 
doesn’t have a dragDrop handler) will get the message and it will fall through 
to the card where you can handle it.

This in my card script:

on dragEnter
  set the dragAction to "link" -- for files
  pass dragEnter
end dragEnter

on dragDrop
  put the dragData into tDragData
  set the dragData to empty
  -- do something with tDragData
end dragDrop

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Dropping file on an LC standalone...

2024-03-21 Thread Bob Sneidar via use-livecode
Does it have to be the icon? If I drag a file onto an app in the Windows Tack 
Bar it does nothing, even if the file belongs to the app I am dragging the file 
onto. If however I HOVER on the icon and the app is running, it will bring the 
app to the front and show the frontmost window if it is hidden.

If I drag the file onto the open Window, the app will open it. Case in point, 
drag an Excel spreadsheet onto the Excel icon in the task bar. All it will do 
is add a shortcut to the Excel icon for that file. But launch Excel, open a 
blank spreadsheet, then drag an excel file onto the icon, hover, then drop onto 
the blank Excel Spreadsheet. In THIS case it will open the spreadsheet in a new 
window.

Because of this you may be able to use a Drag / Drop handler in your card 
script. The caveat is that the card itself will not accept a drag/drop action, 
but if you drag anything on top of an actual object, THEN the card will get the 
message.

So to handle this, add an opaque rectangle the size of the card behind 
everything else (if the opacity is set to 99 it will appear transparent for all 
intents and purposes). The rectangle (or any other object on the card that 
doesn’t have a dragDrop handler) will get the message and it will fall through 
to the card where you can handle it.

This in my card script:

on dragEnter
   set the dragAction to "link" -- for files
   pass dragEnter
end dragEnter

on dragDrop
   put the dragData into tDragData
   set the dragData to empty
   -- do something with tDragData
end dragDrop

On Mar 21, 2024, at 2:48 PM, Paul Dupuis via use-livecode 
 wrote:

My question is what message is triggered when a file is dropped on a running LC 
standdalone on Windows

On Windows, if the APP is started by dropping a file on it, the file name is 
available to any handler in the startup sequence via the $1 special variable. 
i.e. IF teh variable $1 contains a file name the app was started by someone 
droping the file on teh app or by double-clicking a file associated with teh 
app.

On macOS, this is all handled by appleEvents. i.e. if a file is dropped on a LC 
standalone on macOS that standalone gets an appleEvent message and the 
parameters of the message can be used to get the file name . This is true on 
startup (if a file was dropped on the app to start it or an associated file was 
double clicked to start the app OR on macOS if the app is already running and a 
file is dropped on its icon, the app gets an appleEvent message.

So, what message does a LC standalone app on Windows get, if it has been 
running and a file is dropped on its icon? An what is the message path of that 
message (i.e. is it send to the current card, current stack, the mainstack 
card, or the mainstack stack?)

Thanks in advance!

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Dropping file on an LC standalone...

2024-03-21 Thread Paul Dupuis via use-livecode
My question is what message is triggered when a file is dropped on a 
running LC standdalone on Windows


On Windows, if the APP is started by dropping a file on it, the file 
name is available to any handler in the startup sequence via the $1 
special variable. i.e. IF teh variable $1 contains a file name the app 
was started by someone droping the file on teh app or by double-clicking 
a file associated with teh app.


On macOS, this is all handled by appleEvents. i.e. if a file is dropped 
on a LC standalone on macOS that standalone gets an appleEvent message 
and the parameters of the message can be used to get the file name . 
This is true on startup (if a file was dropped on the app to start it or 
an associated file was double clicked to start the app OR on macOS if 
the app is already running and a file is dropped on its icon, the app 
gets an appleEvent message.


So, what message does a LC standalone app on Windows get, if it has been 
running and a file is dropped on its icon? An what is the message path 
of that message (i.e. is it send to the current card, current stack, the 
mainstack card, or the mainstack stack?)


Thanks in advance!

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode