Em Andamento

Javascript Question: How to Convert Hexadecimal Number to High and Low 32-bit values

(If you know this, it should be easy money for 2 minutes of work)

I need a few lines of Windows Script / Javascript code that will take a hexadecimal number (in the form of a 16 character string) and convert it to two variables representing the high and low 32 bits of the 64-bit original value.

I am trying to use the iTunes COM function "ItemByPersistenID" to play a song in iTunes with Windows Script. But I only have the hexadecimal value of the PersistentId and the function only takes the high and low 32-bits.

The function definition (from the iTunes COM SDK documentation)

function TrackCollection:ItemByPersistentId(long highID, long lowID)

where the "highID" parameter is "The high 32 bits of the 64-bit persistent ID" and "lowID" is "The low 32 bits of the 64-bit persistent ID".

## Deliverables

Here is the code I am using:

<span class="kwd" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: #00008b;">var</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;"> thePersistentId </span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">=</span> <span class="str" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: maroon;">"F040658A7687B12D"</span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">;</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;"> <br /></span><span class="kwd" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: #00008b;">var</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;"> iTunes </span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">=</span> <span class="typ" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: #2b91af;">WScript</span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">.</span><span class="typ" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: #2b91af;">CreateObject</span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">(</span><span class="str" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: maroon;">"[url removed, login to view]"</span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">);</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;"> <br /></span><span class="kwd" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: #00008b;">var</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;"> high </span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">=</span> <span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">(</span><span class="kwd" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: #00008b;">do</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;"> something </span><span class="kwd" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: #00008b;">with</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;"> thePersistentId</span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">?);</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;"> <br /></span><span class="kwd" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: #00008b;">var</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;"> low </span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">=</span> <span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">(</span><span class="kwd" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: #00008b;">do</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;"> something </span><span class="kwd" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: #00008b;">else</span> <span class="kwd" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: #00008b;">with</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;"> thePersistentId</span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">?);</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;"> <br />iTunes</span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">.</span><span class="typ" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: #2b91af;">LibraryPlaylist</span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">.</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">tracks</span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">.</span><span class="typ" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: #2b91af;">ItemByPersistentId</span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">(</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">high</span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">,</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">low</span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">).</span><span class="pln" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">play</span><span class="pun" style="border:0px;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: black;">();</span>

All I am looking for is those two lines of code to calculate the value of "high" and "low". I will test on my end.

Habilidades: Javascript, MySQL, PHP, Instalação de Script, Shell Script, Arquitetura de software, Teste de Software, Visual Basic, Hospedagem Web, Gestão de Site , Teste de Website

Ver mais: work values, transparent padding, test my javascript, style background color javascript, padding background, low bits, how to string, how to code php, how to code, convert c to javascript, bit bits, background padding, how to take a test, convert font, typ, str, how should, high convert, baseline, php javascript class, code convert javascript code, number top, class convert, convert php class javascript class, background color javascript

Acerca do Empregador:
( 71 comentários ) United States

ID do Projeto: #3057168

Premiar a:

hainraja

See private message.

$21.25 USD em 1 dia
(144 Avaliações)
6.2

6 freelancers estão ofertando em média $24 para este trabalho

talkwaqar

See private message.

$51 USD em 1 dia
(40 Comentários)
5.6
ivankorhner

See private message.

$34 USD em 1 dia
(40 Comentários)
4.7
infiniteix

See private message.

$12.75 USD em 1 dia
(32 Comentários)
3.2
bubra

See private message.

$20.4 USD em 1 dia
(7 Comentários)
2.0
iucoder

See private message.

$3.4 USD em 1 dia
(2 Comentários)
0.0