Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Questions about V6
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 08-03-2007, 09:24 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
File Dragging, Yay!

This is a scripting question I know but it is a new feature in v5 that I want to know about and I figure the only people with the answers are more likely to look here then the other place.

control.acceptdropfiles = true;
Drag a file
control.onDropFiles(mousexpos, mouseypos, files) { stuff(); }

Yes, yes, yes.

BUT!

How do you load the lines of that file? I can see how you could use this with clientrc to upload something but loadlines (vars, string, etc.) is limited to only 3 folders (that being scriptfiles, updatepackages and tiledefs).

Do I really have to upload the file, then loadlines it serverside and send that clientside all the while being connected via sendtext (clientrc) just so I can look at a file on my computer with Graal? I don't think clientrc should be required for this...

I can see the security issues here but maybe you can have something like:
control.loaddropfilelines = true;

And when it's true:
control.onDropFiles(mousexpos, mouseypos, files, lines) { stuff(); }

Lines would just be blank when the above is false. (People who want to load vars or other things can just loadvarsfromarray and such)
__________________
Do it with a DON!
Reply With Quote
  #2  
Old 08-06-2007, 12:58 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Now that you are back Stefan, can you look at this?
__________________
Do it with a DON!
Reply With Quote
  #3  
Old 08-06-2007, 10:44 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Right now it can only be used for file uploading (client-rc) and for knowing what filename has been dropped on the Graal window. That can be useful for scripted editors or similar. Scripts currently don't have access to it because of possible security problems (someone might trick the player to drop an important file on the Graal window and then stealing that file). May be reading could be enabled for certain file types though (gani, txt etc.) once the file has been dropped on the Graal window.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:27 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.