Indigo Rose Software
  #1  
Old 10-18-2004
brianlesker brianlesker is offline
Forum Member
 
Join Date: Oct 2003
Posts: 49
Problem: Comparing CRC value

Good morning!

I have a little problem....

Have a textfile with a CRC value in it AND my installer gets the CRC value of the installer himself.

Want to compare those value's with each other, but one is numberic and the other "characters".

How can i convert one of those value's to compare them correctly?

Brian
Reply With Quote
  #2  
Old 10-18-2004
Brett's Avatar
Brett Brett is offline
Indigo Rose Staff Member
 
Join Date: Jan 2000
Posts: 2,001
They should work properly with normal comparison (==). The Lua engine is pretty smart about runtime type conversion.
Reply With Quote
  #3  
Old 10-18-2004
brianlesker brianlesker is offline
Forum Member
 
Join Date: Oct 2003
Posts: 49
Doesn't work here :(

The dialog box returns same value's, so normaly he don't go in the if loop "if (strCRCPreInstaller ~= strCRCCheckPreInstaller) then"

You c the problem?????

<code>
strCRCPreInstaller = File.GetCRC(_SourceFolder.."\\UserPreInst"..strApp Ver..".exe");

-- CRC waarde uit file lezen
tableCRCCheckPreInstaller = TextFile.ReadToTable(_SourceFolder.."\\UserPreInst "..strAppVer..".txt"); -- Tekstfile inlezen in een table
strCRCCheckPreInstaller = tableCRCCheckPreInstaller[1]; -- Regel 1 in variabele zetten

if (strCRCPreInstaller ~= strCRCCheckPreInstaller) then
result = Dialog.Message("Debug", strCRCPreInstaller..".\n"..strCRCCheckPreInstaller ..".", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
result = Dialog.Message("Waarschuwing", "CRC doesnt match", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
Application.Exit(PreInstInvalidCRCCheck);
end
</code>

Last edited by brianlesker; 10-18-2004 at 09:34 AM.
Reply With Quote
  #4  
Old 10-18-2004
Darryl's Avatar
Darryl Darryl is offline
Indigo Rose Staff Member
 
Join Date: Jul 2001
Location: Indigo Rose Software
Posts: 1,602
Take a look at the "String.ToNumber" action. That should allow you to compare the two numbers.

Hope that helps.

Darryl
__________________
Darryl
Indigo Rose Corporation

Product Guides: AMS70 | SUF80 | TU30 | VP30 |MSIFACT |DeltaMAX
Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Video Problem ScottDuncan AutoPlay Media Studio 5.0 0 07-10-2004 02:38 PM
PROBLEM: Setup Starts and then Crashes Support Setup Factory 5.0 0 10-15-2002 04:02 PM
PROBLEM: Setup Requests Disk 2 in a Single File Setup Support Setup Factory 6.0 Knowledge Base 0 10-09-2002 03:04 PM
INFO: Tips for Debugging Action Lists in AutoPlay Media Studio 4.0 Support AutoPlay Media Studio 4.0 Examples 0 10-03-2002 09:38 AM


All times are GMT -6. The time now is 07:12 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software