Skip to content

Commit

Permalink
Merge pull request #1 from alejandrocordon/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
alejandrocordon authored Sep 16, 2022
2 parents 3f8d44d + c45c33a commit 20f826f
Show file tree
Hide file tree
Showing 15 changed files with 493 additions and 25 deletions.
6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 74 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions MoveMouse.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 11.4;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -407,7 +407,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 11.4;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
Expand All @@ -425,7 +425,7 @@
CODE_SIGN_ENTITLEMENTS = MoveMouse/MoveMouse.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_ASSET_PATHS = "\"MoveMouse/Preview Content\"";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -434,8 +434,8 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.4;
MARKETING_VERSION = 1.0;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = test.MoveMouse;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand All @@ -452,7 +452,7 @@
CODE_SIGN_ENTITLEMENTS = MoveMouse/MoveMouse.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_ASSET_PATHS = "\"MoveMouse/Preview Content\"";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -461,8 +461,8 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.4;
MARKETING_VERSION = 1.0;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = test.MoveMouse;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down
61 changes: 45 additions & 16 deletions MoveMouse/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,60 @@ import SwiftUI
import Cocoa
import Foundation



struct jerry {
static var go = false
static var timeInt = 5_000_000
}

struct ContentView: View {
@State private var time: String = "5"
@State private var buttonBackColor:Color = .yellow

var body: some View {
Text("Go Move mouse")
.lineLimit(nil)
VStack {
Text("Go Move mouse")
.lineLimit(nil)
.padding([.top, .leading, .bottom], 10.0)
.frame(width: 200.0, height: 30.0)

Text("Time between movements (segs)")
.lineLimit(nil)
.padding([.top, .leading, .bottom], 5.0)
.frame(width: 250.0, height: 20.0)

TextField(
"Time between movements (segs)",
text: $time
)
.onSubmit {
print("let's go !",jerry.timeInt)
}
.disableAutocorrection(true)


Button("Move mouse") {
jerry.go = true
jerry.timeInt = Int(time)!
print("let's go !",jerry.timeInt)
self.buttonBackColor = .green
DispatchQueue.global().async {
moveAroundAndLeftClick()
}
}
.padding([.top, .leading, .bottom], 10.0)
.frame(width: 200.0, height: 50.0)
Button("Move mouse") {
jerry.go = true
print("let's go !",jerry.go)
DispatchQueue.global().async {
moveAroundAndLeftClick()
.frame(width: 200.0, height: 30.0)
Button("Stop mouse") {
jerry.go = false
self.buttonBackColor = .red
print("Stop!", jerry.go)
}
.padding([.top, .leading, .bottom], 10.0)
.frame(width: 200.0, height: 30.0)
}
.padding([.top, .leading, .bottom], 10.0)
.frame(width: 200.0, height: 50.0)
Button("Stop mouse") {
jerry.go = false
print("Stop!", jerry.go)
}
.padding([.top, .leading, .bottom], 10.0)
.frame(width: 200.0, height: 50.0)
.background(buttonBackColor)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>21E258</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>MoveMouse</string>
<key>CFBundleIconName</key>
<string>AppIcon</string>
<key>CFBundleIdentifier</key>
<string>test.MoveMouse</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>MoveMouse</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>13F100</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>12.3</string>
<key>DTSDKBuild</key>
<string>21E226</string>
<key>DTSDKName</key>
<string>macosx12.3</string>
<key>DTXcode</key>
<string>1341</string>
<key>DTXcodeBuild</key>
<string>13F100</string>
<key>LSMinimumSystemVersion</key>
<string>12.0</string>
<key>NSHumanReadableCopyright</key>
<string></string>
</dict>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APPL????
Binary file not shown.
Loading

0 comments on commit 20f826f

Please sign in to comment.