vendredi 10 avril 2015

Add 0 padding to Sqlite entry in AutoHotKey

I am trying to add one or two zeroes to the left of an integer. I get the 0 added in the ahk variable, howeverm when I add it to the sqlite DB, the zeroes are omitted.



StringLen, sLen, sequenceNumber
if (sLen == 1)
{
sortOrder = 00%sequenceNumber%
}
if (sLen == 2)
{
sortOrder = 0%sequenceNumber%
}
if (sLen == 3)
{
sortOrder = %sequenceNumber%
}
msgbox, sort order: %sortOrder% ;it shows right results 009, 010
record.SortOrder := sortOrder


I tried to use the || to concat to a string in Sqlite, but it won't work inside an ahk script. It acts as the OR operator and returns 1


Aucun commentaire:

Enregistrer un commentaire