Clipboard use for image
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Clipboard use for image
Hello here,
I'm trying to paste a image copied from a browser page to a object image, but I fail...
I tried with the property:
set the clipboardData["image"] to image 1, I read that in the Dictionary API
I tried also with full and raw Clipboarddata property, but I continue to fail
I tested tihs in Windows 10 and Linux system (manjaro)...
Live code version is 9 rc
I'm trying to paste a image copied from a browser page to a object image, but I fail...
I tried with the property:
set the clipboardData["image"] to image 1, I read that in the Dictionary API
I tried also with full and raw Clipboarddata property, but I continue to fail
I tested tihs in Windows 10 and Linux system (manjaro)...
Live code version is 9 rc
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Clipboard use for image
Have you tried the paste command?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Clipboard use for image
Code: Select all
set the text of image 1 to the clipboardData["image"]
shiftLock happens
Re: Clipboard use for image
Hi All,
I tried to copy an image diplayed by browser and checked clipboardData["image"] which is empty.
Is it possible to copy an image displayed by browser ?
I tried to copy an image diplayed by browser and checked clipboardData["image"] which is empty.
Is it possible to copy an image displayed by browser ?
https://alternatic.ch
Re: Clipboard use for image
Here is what zapx is probably seeing (linux, lc8.x)
This fails as shown on 'nix just trying to work with two image objects on the same card.

Re: Clipboard use for image
This works here, as long as the image is one of PNG, GIF or JPEG (or a dataURL of that).
Copy the image in your browser. Then use
(With some browsers on some OS the clipboardData["image"] also works.)
Copy the image in your browser. Then use
Code: Select all
on mouseUp
if there is no img "import" then create img "import"
lock the clipboard
set the text of img "import" to the fullClipboardData["image"]
unlock the clipboard
end mouseUp
shiftLock happens
Re: Clipboard use for image
I believed that first post was about browser widget not project browser
@Bogs
First time I use it and it works (LC 9.0.1, OS X 10.13)
Copy and paste an image control works
After copy an image control
doesnt work. clipboardData["image"] = empty
As Hermann said:
works fine 
Best
Jean-Marc
Code: Select all
set the clipboardData["image"] to image 1
First time I use it and it works (LC 9.0.1, OS X 10.13)
Copy and paste an image control works
After copy an image control
Code: Select all
set the text of img "myImg" to clipboardData["image"]
As Hermann said:
Code: Select all
set the text of img "myImg" to fullclipboardData["image"]

Best
Jean-Marc
https://alternatic.ch
-
- Posts: 12
- Joined: Thu Feb 12, 2015 12:22 pm
Re: Clipboard use for image
Hello,
Copy from clipboard does not work on Windows 10 or Windows 11.
I'm using LC 9.6.9 on a Mac, and it's working OK on a Mac!!
I tried different codes already.
Please Help!
Dirk
Copy from clipboard does not work on Windows 10 or Windows 11.
I'm using LC 9.6.9 on a Mac, and it's working OK on a Mac!!
I tried different codes already.
Please Help!
Dirk
-
- Livecode Opensource Backer
- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Re: Clipboard use for image
Code: Select all
on mouseUp
paste
set the name of the last image to "XXX"
set the loc of img "XXX" to 200,200
end mouseUp
Works 100% on a Macintosh.
- Attachments
-
- Paster.livecode.zip
- Stack.
- (825 Bytes) Downloaded 155 times
-
- Posts: 12
- Joined: Thu Feb 12, 2015 12:22 pm
Re: Clipboard use for image
Hi richmond62 again,
I Tried your code, but it does not work on Windows 10/11!!
Sorry,
Now, I fount this code to be working
Dirk
I Tried your code, but it does not work on Windows 10/11!!
Sorry,
Now, I fount this code to be working
Code: Select all
put the fullclipboardData["image"] into tClipboardDataImage
if tClipboardDataImage is no empty then
put tClipboardDataImage into image "imgMyImage"
-
- Livecode Opensource Backer
- Posts: 10078
- Joined: Fri Feb 19, 2010 10:17 am
Re: Clipboard use for image
I am sorry, Dirk: I only work with Macintosh and Linux.
I am glad you found a way to do whay you want on Windows.
Al het beste. Richmond.
I am glad you found a way to do whay you want on Windows.
Al het beste. Richmond.