Jump to content
Sign in to follow this  
faustf

question esadecimal in file

Recommended Posts

hi guy , i have a foto and want insert some tag inside , (like do this program fototagger) .

in practic i must insert some javascript code inside the foto in esadecimal

example :

i have a foto,jpg , i open whit fototagger , insert a tag over , and save whit new name foto2.jpg ,

after this i open whit ultraedit , the foto2.jpg and look where past a code for tag , i understund how do (is simple ) but i wanna do the same directly whit autoit , is possible ?? ?

thankzz

Share this post


Link to post
Share on other sites

Javascript in a picture?

Maybe you can try explaining it a little better and why?

Edited by Jos

Share this post


Link to post
Share on other sites

i try

so download fototagger at this address http://www.fototagger.com/

is free and try fototagger

open a foto.jpg insert tag and save whit foto2.jpg

after saved if you do double clik over foto2.jpg , you can look a normal foto whit out tag

but if you open foto2.jpg whit fototagger you can see a tag saved before.

if you open foto2.jpg whit exadecimal editor like ultraedit , you can look a code in javascript of fototagger program

i wanna insert the javascript whit out fototagger but whit autoit , is possible? ??

Share this post


Link to post
Share on other sites

As the format specification is not available on their website it will be hard work to determine how to store the tag information.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

do this procedure for understund

software required

1. http://www.fototagger.com/download.php?product=latest

2. ulrtraedit software

3. use one foto in your pc , (i call foto.jpg)

instruction: open foto.jpg with fototagger insert a tag . save your foto whit foto2.jpg name

open foto.jpg and foto2.jpg whit ultraedit

look a difference

the difference are this code :

<rdf:RDF xmlns:ftg="http://www.cogitum.com/fototagger/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<rdf:Description rdf:about="http://www.cogitum.com/fototagger/">

<ftg:layer rdf:parseType="Collection">

<ftg:label ftg:UID="1">

<ftg:name>prova&lt;br&gt;</ftg:name>

<ftg:pos_x>325</ftg:pos_x>

<ftg:pos_y>1051</ftg:pos_y>

<ftg:width>99</ftg:width>

<ftg:height>34</ftg:height>

<ftg:region ftg:region_type="rect">

<ftg:region_left>752</ftg:region_left>

<ftg:region_top>1081</ftg:region_top>

<ftg:region_width>118</ftg:region_width>

<ftg:region_height>119</ftg:region_height>

</ftg:region>

</ftg:label>

</ftg:layer>

<ftg:caption_x>10</ftg:caption_x>

<ftg:caption_y>10</ftg:caption_y>

<ftg:version>7</ftg:version>

<ftg:matte ftg:matte_left="0" ftg:matte_right="1638" ftg:matte_top="0"

ftg:matte_bottom="1229" />

<ftg:image_size_x>1638</ftg:image_size_x>

<ftg:image_size_y>1229</ftg:image_size_y>

<ftg:cap_text/>

<ftg:image_size_x>1638</ftg:image_size_x>

<ftg:image_size_y>1229</ftg:image_size_y>

</rdf:Description>

</rdf:RDF>

in practic fototagger , injects the javascript code , in a part of foto

is possible injects whit autoscript the code inside the foto ??

thakz

Share this post


Link to post
Share on other sites

Unfortunately I don't have the time to download ultraedit, play with your pictures and present the solution.

You need to determine where to insert this xml text. Is it at the end of the picture?

If you know where to insert simply use FileOpen, FileRead, FileWrite, FileClose to create a copy of the picture.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

no insert not at the end but use esadecimal marker is FFDB put the code after FF and last is FFDB , whit file FileOpen, FileRead .... is possible find esadecimal marker ??

Share this post


Link to post
Share on other sites

Sure. Read the whole picture into a variable using FileRead. Then use StringInStr to find the position of the marker. Split the variable in two parts at this position (Stringleft, StringMid) and combine all 3 parts to a new variable and write it to a file.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

i tryed to do this

only for understund

Local $file = FileOpen("_DSC0195.jpg", 0)
; Check if file opened for reading OK

; Read in 1 character at a time until the EOF is reached
Local $chars = FileRead($file)
; If @error = -1 Then ExitLoop
MsgBox(0, "Char read:", $chars)

FileClose($file)

but messagebox giveme only first 4 carachter

Share this post


Link to post
Share on other sites

Use

MsgBox(0, "Char read:", BinaryToString($chars))
to get the hex representation of the string.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Change the first line to

Local $file = FileOpen("_DSC0195.jpg", 16)
so you read the file as binary.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I used this script and got a long, long display of characters.

Local $file = FileOpen("P1000545.JPG", 16)
Local $chars = FileRead($file)
MsgBox(0, "Char read:", $chars)
FileClose($file)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

That's the hexadecimal representation of your file. It's the only way to read the file - else it will stop at the first 0x00 character. That's why you see just 4 characters.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...