Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
5

The save button doesn't check the validation key on Gumroad for Illustrator.

Explorer ,
Dec 03, 2023 Dec 03, 2023

Copy link to clipboard

Copied

Please, when I click the save button, it doesn't check the key. Who can help fix this? I am targeting Illustrator. The script is for Gumroad.
// super simple script

var scriptName = "Testing";

var gumroadRegFolder = Folder("~/Documents/Gumroad Reg");
if(!gumroadRegFolder.exists) {
    gumroadRegFolder.create();
}

var registrationWindow = new Window("palette", "Gumroad Registration");
var registrationWindow = new Window("dialog", "Gumroad Registration");
var regInput = registrationWindow.add("edittext", undefined, "Registration Code Goes In Here");
var buttonGroup = registrationWindow.add("group", undefined, "");
buttonGroup.orientation = "row";
var cancelButton = buttonGroup.add("button", undefined, "Cancel");
var saveButton = buttonGroup.add("button", undefined, "Save");

var window = new Window("palette", "Gumroad Test", undefined);
window.orientation = "column";
var text = window.add("statictext", undefined, "You've successfully gotten past Gumroad registration");
var button = window.add("button", undefined, "Button");

var gumroadCheckFile = File("~/Documents/Gumroad Reg/"+scriptName+".json");
if(!gumroadCheckFile.exists) {
    registrationWindow.center();
    registrationWindow.show();
} else {
    gumroadCheckFile.open("r");
    var regInfo = gumroadCheckFile.read();
    gumroadCheckFile.close();
    verifyRegistration(regInfo);
}

cancelButton.onClick = function() {
    registrationWindow.hide();
}

saveButton.onClick = function() {
    if(regInput.text != "" || regInput.text != "Registration Code Goes In Here") {
        verifyRegistration(regInput.text);
    }
}


function verifyRegistration(regString) {
    var test = system.callSystem('curl https://api.gumroad.com/v2/licenses/verify -d "product_permalink=testproduct" -d "license_key=' + regString + '" -d "product_id=RiaDIgkJC1gh==" -X POST');
    // var test = system.callSystem('curl https://api.gumroad.com/v2/licenses/verify -d "product_permalink=gumroadreg" -d "license_key='+regString+'" -d "increment_uses_count=false" -X POST');

var returnData = JSON.parse(test.slice(test.indexOf("{")-1, test.length));

alert(JSON.stringify(returnData));

if(returnData["success"]) {
    gumroadCheckFile.open("w");
    gumroadCheckFile.write(regString);
    gumroadCheckFile.close();

   
    window.center();
    window.show();
    registrationWindow.hide();
} else {
    alert("Not a valid registration code, please check and try again");
    return false;
}

}
TOPICS
Bug , Experiment , Feature request , How-to , Performance , Scripting , SDK , Tools

Views

450
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Participant ,
Dec 03, 2023 Dec 03, 2023

Copy link to clipboard

Copied

I think "callSystem" is for After Effects only. Illustrator doesn't have an equivalent as far as I know.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 03, 2023 Dec 03, 2023

Copy link to clipboard

Copied

so its not possible to do this ?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 04, 2023 Dec 04, 2023

Copy link to clipboard

Copied

it is possible. theres a workaround. what OS are you using? mac or windows?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 04, 2023 Dec 04, 2023

Copy link to clipboard

Copied

windows

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 04, 2023 Dec 04, 2023

Copy link to clipboard

Copied

Ok. Let me dig up my curlFromIllustrator function and at the very least it might point you in the right direction.

 

It should do exactly what you're trying to do already, except for how you get the data after it's curled. 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 05, 2023 Dec 05, 2023

Copy link to clipboard

Copied

@Disposition_Dev  I would be interested in this too.  Please post it if you find it.  Thanks in advance. 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 05, 2023 Dec 05, 2023

Copy link to clipboard

Copied

LATEST

yes please

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines