※C:\Program FilesやC:\Program Files (x86)はアクセス権限の影響で書き込めないことがあるので、エディタの保存に気を付けてください。

<button label="テスト" click="ExecuteScript" tag="Internal;C:\Users\username\Documents\Sample.cs" image="54" />


/* C:\Users\username\Documents\Sample.cs */

using System;
using System.Drawing;
using System.Windows.Forms;
using FlashDevelop;
using PluginCore;

public class FDScript
	* Entry point of the script.
	public static void Execute()
		// Get icon for menu items
		Image image = Globals.MainForm.FindImage("192");
		// Add a custom button to the toolstrip
		ToolStrip toolstrip = Globals.MainForm.ToolStrip;
		toolstrip.Items.Add(new ToolStripButton("Hello", image, OnHelloClick));
		// Add a menu item to the view menu
		ToolStripMenuItem viewMenu = Globals.MainForm.FindMenuItem("ViewMenu") as ToolStripMenuItem;
		viewMenu.DropDownItems.Add(new ToolStripMenuItem("Hello", image, OnHelloClick));
	* Handles the click event for the menu items.
	public static void OnHelloClick(Object sender, EventArgs e)


Leave a comment

Your email address will not be published. Required fields are marked *