Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


RE: What language is best for my goal?

 
Logged in as: Guest
arrSession:exec spGetSession 2,7,26375
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [General Forum] >> Other Programming/Scripting Languages >> RE: What language is best for my goal?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: <<   < prev  1 [2]
Login
Message << Older Topic   Newer Topic >>
 RE: What language is best for my goal? - 9/29/2005 10:55:44 PM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
Me neither, but i can't help to snoop the web to get as close as i can to the request...

Last chance for me...... try this:

http://www.vimas.com/server_sdk/pixcolor.htm


Examples:<% @language="VBScript" %>
<%

Set myImage = Server.CreateObject("VIMAS.Image") ' Declare variable to hold the IVimasImage Object reference.

fileSize = myImage.Load("c:\images\girl.png")

if not myImage.Colormap = imgColor_24 then

' Convert image into TrueColor colormap mode.
Call myImage.Edit("RGB24", "", "")

endif

Dim Color As OLE_COLOR

' get pixel color in position x=10, y=20
Color = myImage.PixelColor(10, 20)

' retrieve Alpha, Red, Green, Blue components of the color
If Color < 0 Then
Color = 2147483647 + Color + 1
Alpha = Color \ (2 ^ 23)
Color = Color - Alpha * (2 ^ 23)
Alpha = Alpha + 1
Else
Alpha = Color \ (2 ^ 24)
Color = Color - Alpha * (2 ^ 24)
End If
Red = Color \ (2 ^ 16)
Color = Color - Red * (2 ^ 16)
Green = Color \ (2 ^ 8)
Blue = Color - Green * (2 ^ 8)

' set red color to the pixel in the position 10,10
Color = &HFF0000
myImage.PixelColor(10, 10) = Color


%>

_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com

(in reply to TNO)
 
 
Post #: 21
 
 RE: What language is best for my goal? - 9/30/2005 7:04:22 AM   
  OLELukoE

 

Posts: 9
Score: 0
Joined: 9/26/2005
Status: offline
I very much appreciate that you guys are trying to help. I'm a little confused about the code you posted - I don't know the languages involved but it seems to me that one is for clicking an image on a webpage and the other is for loading an image file and then getting the color of its pixels. In my situation, there's a program (which I have nothing to do with) that displays the images. I would like my program to get the position of the program's window and then get the color of a pixel with specified coordinates relative to the top left corner of the program's window. However, that by itself can be done with  AutoIt (it has all the required functions). My problem now is that I have to write a complicated algorithm on C++ that decides which button to click and I don't know how I can integrate AutoIT functions and a C++ program (call one of them from the other?).

< Message edited by OLELukoE -- 9/30/2005 7:06:06 AM >

(in reply to Snipah)
 
 
Post #: 22
 
 RE: What language is best for my goal? - 9/30/2005 3:37:19 PM   
  TNO


Posts: 1064
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
What do these buttons do and why do you need to click them?

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to OLELukoE)
 
 
Post #: 23
 
 
Page:  <<   < prev  1 [2]
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [General Forum] >> Other Programming/Scripting Languages >> RE: What language is best for my goal? Page: <<   < prev  1 [2]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts