Jump to content
Sign in to follow this  
gimx

How can I share my script with a friend ?

Recommended Posts

gimx

Hello,

Sorry for this stupid question... :D

I want share my script with a friend. What files I need to include in my zip ? I must join the .exe of course, sqlite.dll, sqlite.exe and the database I think.

No others files ?

Thanks :huggles:

Share this post


Link to post
Share on other sites
PsaltyDS

Well, SQLite3.dll is included (a string image of the binary) in the "include" file SQLite.dll.au3. So you don't have to include that.

AutoIt only needs the .dll, so unless you coded some shell commands to SQLite3.exe it isn't required either.

:D

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
gimx

So if my friend can't run the script, this is not my fault :huggles:

Probably a security software which block the script. I'll see it with him.

Thank you :D

Share this post


Link to post
Share on other sites
gimx

Hello,

I have send my script to my friend but it don't work... And with my PC, it work perfectly...

He have this error :

Line 9349 (File"c:\Documents an Setting\xxx\Bureau\xxx.exe"):

Error Subscript user with non-Array variable

The problem : The script have 1000 lines...

Any idea ?

Thanks.

Edited by gimx

Share this post


Link to post
Share on other sites
PsaltyDS

Any idea ?

Debug your buggy script?

Review all your uses of array, and see where the array is declared/returned. Make sure you have error checking after any functions that might not return the array you ASSUMED it would.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
gimx

Your script uses #include files. The entire contents of those #include files are inserted at the beginning of your script thus increasing the number of lines your script contains.

Thank you ! Now I can find what lines are wrong :D

Share this post


Link to post
Share on other sites
gimx

Debug your buggy script?

Review all your uses of array, and see where the array is declared/returned. Make sure you have error checking after any functions that might not return the array you ASSUMED it would.

:D

I'm a noob in programming, not a pro.

Can you give me an example for error checking please ?

Share this post


Link to post
Share on other sites
PsaltyDS

For example: If _FileListToArray() fails, the result is NOT an array:

; What if Windows is actually installed in "D:\WINNT"?
$aFiles = _FileListToArray("C:\Windows", "*")
If @error Then
    MsgBox(16, "Error", "File listing failed")
    Exit
EndIf

MsgBox(64, "Found", "First file found: " & $aFiles[1])

:D

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
gimx

Ah ok, it's simple, just a msgbox with an if... I'm stupid... :D

Thank you.

Share this post


Link to post
Share on other sites
gimx

Hello PsaltyDS and the forum,

I've found errors in my script. So I join the new exe and the sqlite database to my friend. In the database, I've set tables, etc...

My friend run the script and he have no error BUT the database is empty... And when I say empty, it means the database is blank, no data and no table ! A blank file... When I open the database after he run the script, all tables are deleted...

Do you have an idea why my script delete table ?

Thanks

PS : The script works perfectly on my PC...

Share this post


Link to post
Share on other sites
PsaltyDS

Do you have an idea why my script delete table ?

No code here to talk about.

Sorry, Steve broke my crystal ball after I leaked the story about the iPad.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
gimx

Aaahhh sh*t ! I have the same error at the beginning ! (Error Subscript user with non-Array variable) :D

I think the wrong part is :

If $nomjockey <> "Non-partante" And $nomjockey <> "Non-partant" And $nomjockey <> "" Then
                        _SQLite_QuerySingleRow(-1, "SELECT numauto FROM jockey WHERE nom = '" & $nomjockey & "' LIMIT 1;", $aRow)
                    EndIf
                    If @error = 3 Then
                        $aRow = "ok"
                    EndIf

In fact, I want to insert datas only if the sql query return no result.

Edited by gimx

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  

×