Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sinister Zeta Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sinister Zeta
Sinister Zeta Project
Commits
31107f06
Commit
31107f06
authored
4 years ago
by
Branden
Browse files
Options
Downloads
Patches
Plain Diff
Created StringToInt method for converting string to actionlist
parent
c413f493
No related branches found
No related tags found
2 merge requests
!65
Prototype
,
!63
Feature finish launch program
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/model/ProgramLaunchConverter.java
+29
-0
29 additions, 0 deletions
src/model/ProgramLaunchConverter.java
with
29 additions
and
0 deletions
src/model/ProgramLaunchConverter.java
+
29
−
0
View file @
31107f06
package
model
;
import
java.util.ArrayList
;
public
class
ProgramLaunchConverter
{
/**
* Takes the file path as a string and converts it to an ArrayList<Integer>. the first entry is always 10000, this is to identify it has a launch program hotkey.
* @param s a string that represents the absolute path to the exe you wish to bind.
* @return and ArrayList<Integer> of actions.
*/
public
static
ArrayList
<
Integer
>
StringToInt
(
String
s
){
ArrayList
<
Integer
>
actionList
=
new
ArrayList
<>();
// Identifying keycode used to check during preform action if it's a launch program type.
actionList
.
add
(
10000
);
try
{
byte
[]
bytes
=
s
.
getBytes
(
"US-ASCII"
);
//System.out.println(Arrays.toString(bytes));
for
(
int
i
=
0
;
i
<
bytes
.
length
;
i
=
i
+
1
){
int
p
=
bytes
[
i
];
//System.out.println(p);
actionList
.
add
(
p
);
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
return
actionList
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment