New to Coding. Stuck now.. Need help

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
prajeesh K
Posts: 3
Joined: Sun Dec 21, 2014 12:21 pm

New to Coding. Stuck now.. Need help

Post by prajeesh K » Wed Dec 24, 2014 6:16 pm

Hello to all,

I am completely new to coding, but found livecode as very interesting. I am just playing around by creating a test app. I have been able to successfully add image. Now i dont want to use the standard Paint tools provided by livecode. Instead i want to code it out. Especially the rectangle , and also help in selecting part of images through cursor movement.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: New to Coding. Stuck now.. Need help

Post by dunbarx » Wed Dec 24, 2014 7:07 pm

Hi.

Try this in a button somewhere:

Code: Select all

on mouseUp
   create graphic "newGraphic"
end mouseUp
Now this is just to show you that the "create" command is your friend. But were you comfortable with "in a button somewhere"? Did you know how to place a "mouseUp" handler in such a button's script? In other words, where are you in your LC learning curve? Write back. What would you do if it was NOT a rectangle graphic you wanted? That sort of thing is where this roads starts...

Craig newman

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: New to Coding. Stuck now.. Need help

Post by dunbarx » Wed Dec 24, 2014 7:12 pm

Just reread the latter part of your post.

Firstly, as I said, let's find out where you are with learning LC.

But then, what exactly did you mean by "selecting part of images through cursor movement"? LC can do anything at all, but I am not sure what you intended.

Craig

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: New to Coding. Stuck now.. Need help

Post by jmburnod » Wed Dec 24, 2014 7:42 pm

Hi,
"import snapshoot" could be the trick.

Code: Select all

import snapshoot
and you can select a part of screen with cursor and LC import it in a new img 8)
Best regards
Jean-Marc
https://alternatic.ch

prajeesh K
Posts: 3
Joined: Sun Dec 21, 2014 12:21 pm

Re: New to Coding. Stuck now.. Need help

Post by prajeesh K » Thu Dec 25, 2014 5:17 am

Hi All,

Thanks for the reply. I have just started. Created the basic calculator app. That's how i got some confidence of creating an app by myself. yes i am comfortable with the mouseup :) ... My idea is to have a button to select image externally.(this is working fine for me). Then edit the image using custom paint tool (similar to the one provided by livecode tool kit). I want to place the paint tool in my app. :) . Make some changes and save it ( I have not reached to that level :) )

The idea for cursor movement is to crop a part of image which is not defined by any geometric shape mentioned in the paint tool. I should be able to crop the image in any shape.

Hopefully i am able to clarify myself :)


Prajeesh

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: New to Coding. Stuck now.. Need help

Post by Klaus » Thu Dec 25, 2014 1:16 pm

Namaste Prajeesh,

well, your wishes are quite advanced stuff :D
I would recommend to get the basics of Livecode first and start small, one step after another.

Here some really great learning resources:
http://www.hyperactivesw.com/revscriptc ... ences.html


Best

Klaus

prajeesh K
Posts: 3
Joined: Sun Dec 21, 2014 12:21 pm

Re: New to Coding. Stuck now.. Need help

Post by prajeesh K » Thu Dec 25, 2014 3:09 pm

Hallo Klaus,

:D .... I just came up with this idea so thought of working on it. Well advised ... :) ... i will start going through the link provided by you.

But, would love to know the basic approach of it :)

Regards,
Prajeesh

Post Reply