diff --git a/app/src/main/SampleScripts/example-syntax2.sh b/app/src/main/SampleScripts/example-syntax2.sh index e69de29..1a29420 100644 --- a/app/src/main/SampleScripts/example-syntax2.sh +++ b/app/src/main/SampleScripts/example-syntax2.sh @@ -0,0 +1,17 @@ +/* example-syntax2.sh */ + +Printf("Example Script V2:\n > Loops and slices\n") + +// Iterate through a loop (subtract off two each time): +$ctri = 10; +while($ctri <= 0) { + Printf("LOOP I = %02d\n", $ctri) + $ctri-- + $ctri += -1 +} + +// Examples of slices with arrays: +Printf("TODO ...\n") + +// Finally, conclude the script normally: +Exit(0) diff --git a/app/src/main/SampleScripts/string-handling.sh b/app/src/main/SampleScripts/string-handling.sh index e69de29..40a1355 100644 --- a/app/src/main/SampleScripts/string-handling.sh +++ b/app/src/main/SampleScripts/string-handling.sh @@ -0,0 +1,6 @@ +/* string-handling.sh */ + +Printf("TODO ... Test the string handling functions ...\n") + + +Exit(0) diff --git a/app/src/main/java/com/maxieds/chameleonminilivedebugger/LiveLoggerActivity.java b/app/src/main/java/com/maxieds/chameleonminilivedebugger/LiveLoggerActivity.java index bb4e50a..1127f85 100644 --- a/app/src/main/java/com/maxieds/chameleonminilivedebugger/LiveLoggerActivity.java +++ b/app/src/main/java/com/maxieds/chameleonminilivedebugger/LiveLoggerActivity.java @@ -945,4 +945,9 @@ public void actionButtonScriptingGUIHandlePerformTaskClick(View view) { ScriptingGUIMain.scriptGUIHandlePerformTaskClick((Button) view, view.getTag().toString()); } + public void copyButtonTagToClipboard(View btn) { + String clipBoardText = ((Button) btn).getTag().toString(); + Utils.copyTextToClipboard(this, clipBoardText, true); + } + } \ No newline at end of file diff --git a/app/src/main/java/com/maxieds/chameleonminilivedebugger/Utils.java b/app/src/main/java/com/maxieds/chameleonminilivedebugger/Utils.java index 956aff0..08bf150 100644 --- a/app/src/main/java/com/maxieds/chameleonminilivedebugger/Utils.java +++ b/app/src/main/java/com/maxieds/chameleonminilivedebugger/Utils.java @@ -17,6 +17,8 @@ This program (The Chameleon Mini Live Debugger) is free software written by package com.maxieds.chameleonminilivedebugger; +import android.content.ClipData; +import android.content.ClipboardManager; import android.content.Context; import android.graphics.PorterDuff; import android.graphics.Typeface; @@ -545,4 +547,14 @@ public static void dismissAndroidKeyboard(ChameleonMiniLiveDebuggerActivity acti } } + public static void copyTextToClipboard(ChameleonMiniLiveDebuggerActivity activityCtx, String textToCopy, boolean showToastStatus) { + ClipboardManager clipboard = (ClipboardManager) activityCtx.getSystemService(Context.CLIPBOARD_SERVICE); + ClipData clipData = ClipData.newPlainText("CMLD Find Scripts URL", textToCopy); + clipboard.setPrimaryClip(clipData); + if(showToastStatus) { + String toastMsg = "Copied URL to Clipboard:\n" + textToCopy; + Utils.displayToastMessage(activityCtx, toastMsg, Toast.LENGTH_SHORT); + } + } + } \ No newline at end of file diff --git a/app/src/main/res/drawable/locate_scripts24.webp b/app/src/main/res/drawable/locate_scripts24.webp new file mode 100644 index 0000000..1855ede Binary files /dev/null and b/app/src/main/res/drawable/locate_scripts24.webp differ diff --git a/app/src/main/res/layout/apdu_search_item.xml b/app/src/main/res/layout/apdu_search_item.xml index 5ea8330..8fc74ec 100644 --- a/app/src/main/res/layout/apdu_search_item.xml +++ b/app/src/main/res/layout/apdu_search_item.xml @@ -85,7 +85,6 @@ https://github.com/maxieds/ChameleonMiniLiveDebugger android:textAllCaps="true" android:textSize="12.5sp" android:textStyle="normal" - android:onClick="actionButtonAPDUCopyCmd" android:text="COPY" /> diff --git a/app/src/main/res/layout/scripting_tab_load_import.xml b/app/src/main/res/layout/scripting_tab_load_import.xml index ae97fb7..92b7cab 100644 --- a/app/src/main/res/layout/scripting_tab_load_import.xml +++ b/app/src/main/res/layout/scripting_tab_load_import.xml @@ -369,6 +369,60 @@ https://github.com/maxieds/ChameleonMiniLiveDebugger + + + + + + + + + + +